{"id":20720226,"url":"https://github.com/zaaack/node-systray","last_synced_at":"2025-08-21T03:32:14.517Z","repository":{"id":65513651,"uuid":"98137926","full_name":"zaaack/node-systray","owner":"zaaack","description":"A cross-platform systray library for nodejs.","archived":false,"fork":false,"pushed_at":"2023-08-02T14:59:48.000Z","size":18166,"stargazers_count":87,"open_issues_count":11,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-08T14:24:08.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zaaack.github.io/node-systray/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaaack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-24T01:43:06.000Z","updated_at":"2025-06-08T09:14:28.000Z","dependencies_parsed_at":"2024-06-18T18:38:21.608Z","dependency_job_id":null,"html_url":"https://github.com/zaaack/node-systray","commit_stats":{"total_commits":20,"total_committers":4,"mean_commits":5.0,"dds":"0.15000000000000002","last_synced_commit":"ec3a387f7bf68d17a217cde11114cec19d3a4fe1"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/zaaack/node-systray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Fnode-systray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Fnode-systray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Fnode-systray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Fnode-systray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaaack","download_url":"https://codeload.github.com/zaaack/node-systray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaaack%2Fnode-systray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271420489,"owners_count":24756573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T03:19:41.514Z","updated_at":"2025-08-21T03:32:11.942Z","avatar_url":"https://github.com/zaaack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-systray\n\n\u003e SysTray library for nodejs using [systray-portable](https://github.com/zaaack/systray-portable) (a portable version of [the go systray library](https://github.com/getlantern/systray)).\n\n\n## Install\n```sh\nnpm i systray\n# or\nyarn add systray\n```\n\n## Usage\n\n```ts\nimport SysTray from 'systray'\n\nconst systray = new SysTray({\n    menu: {\n        // you should using .png icon in macOS/Linux, but .ico format in windows\n        icon: \"\u003cbase64 image string\u003e\",\n        title: \"标题\",\n        tooltip: \"Tips\",\n        items: [{\n            title: \"aa\",\n            tooltip: \"bb\",\n            // checked is implement by plain text in linux\n            checked: true,\n            enabled: true\n        }, {\n            title: \"aa2\",\n            tooltip: \"bb\",\n            checked: false,\n            enabled: true\n        }, {\n            title: \"Exit\",\n            tooltip: \"bb\",\n            checked: false,\n            enabled: true\n        }]\n    },\n    debug: false,\n    copyDir: true, // copy go tray binary to outside directory, useful for packing tool like pkg.\n})\n\nsystray.onClick(action =\u003e {\n    if (action.seq_id === 0) {\n        systray.sendAction({\n            type: 'update-item',\n            item: {\n            ...action.item,\n            checked: !action.item.checked,\n            },\n            seq_id: action.seq_id,\n        })\n    } else if (action.seq_id === 1) {\n        // open the url\n        console.log('open the url', action)\n    } else if (action.seq_id === 2) {\n        systray.kill()\n    }\n})\n\n```\n\nFor more API info please see https://zaaack.github.io/node-systray/\n\nHere is also a demo project you might want to check out, it shows how to integrate this library with [opn](https://github.com/sindresorhus/opn), [node-notifier](https://github.com/mikaelbr/node-notifier) and [node-packer](https://github.com/pmq20/node-packer):\n\n\u003e https://github.com/zaaack/aria2c-node-gui\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaaack%2Fnode-systray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaaack%2Fnode-systray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaaack%2Fnode-systray/lists"}