{"_id":"@bunchtogether/node-systray","_rev":"2-1624a6e4aa371867cb932b974cb98955","name":"@bunchtogether/node-systray","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.0":{"name":"@bunchtogether/node-systray","version":"1.1.0","description":"An systray libray for nodejs","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"build":"run-s clean build:lib doc && git add -A","build:lib":"tsc","clean":"del ./lib/**","lint":"tslint ./src/** --type-check -p ./tsconfig.json","test":"cross-env DEBUG=systray* mocha -r ts-node/register ./test/**/*.test.ts","doc":"typedoc --theme minimal --out ./docs ./src && touch ./docs/.nojekyll","cover":"cross-env NODE_ENV=development nyc ava","preversion":"npm run build && git add -A"},"engines":{"node":">=4.0.0"},"pre-commit":[],"repository":{"type":"git","url":"git+https://github.com/zaaack/node-systray.git"},"keywords":["systray","tray","gui"],"author":{"name":"zaaack"},"license":"MIT","bugs":{"url":"https://github.com/zaaack/node-systray/issues"},"homepage":"https://github.com/zaaack/node-systray#readme","devDependencies":{"@types/debug":"^0.0.30","@types/fs-extra":"^4.0.2","@types/mocha":"^5.2.0","@types/node":"^10.0.4","cross-env":"^5.0.5","del-cli":"^1.1.0","mocha":"^5.1.1","npm-run-all":"^4.0.2","nyc":"^11.2.1","pre-commit":"^1.2.2","ts-node":"^6.0.2","tslint":"^5.7.0","tslint-config-standard":"^6.0.1","typedoc":"^0.8.0","typescript":"^2.8.3"},"dependencies":{"debug":"^3.0.1","fs-extra":"^4.0.2"},"gitHead":"13aa09d46f1753eec65cec69801cfcf7952b9e9c","_id":"@bunchtogether/node-systray@1.1.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-uvtX8Ddo12/gPI4029mcfmFJCNb5I2k1d/eWnoDzgmThuIRLsNMohwyXrVx5IUk7CVid1z4iZH/nP8M8zUMvBA==","shasum":"d47f9badb12368cde6879f80f072488338b4abdc","tarball":"https://registry.npmjs.org/@bunchtogether/node-systray/-/node-systray-1.1.0.tgz","fileCount":23,"unpackedSize":35449901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpfLiCRA9TVsSAnZWagAAXFUP/jhVUeLr8bQAli6jqHEC\nHgg21gpzd9v3ECP6ebppnoh4YSL9feJv5uQ6pCd6vcMh/VYvmZz7jkp/5I38\nMRxYRZt1MidU2uxxQ1mBl63Cwd6Xx476+y7oXUSElH5+6z8Wns6r/ryjdIds\nCLHHWych8JBqZMFbJZ1SW3hVBXY8EiJ21irrZRZZfPe2YkOWLE7Ey7QOr1Ab\nwKlrVQTwxdMCbZ1CtadgWeoZ2Xv8YJ/nDMx9oFSxqbysyiIby+oLbxPaC6nj\nZZ5bYQscCtSonbfosWjXafCZoV/XFCjC4BDAzU8IsEOYd835p4XwHlTEpIEi\n6dPDZBTP6scBYcVAJ2dKJUsOfRxHUuv97MFy1Dg83sFeGI5+kZfI6L38+r7Q\nfBiv1rpF65drIKgfL8w5/g7Wc/JdBBUpiYXBtmZxL179L5vuS4LfM7jk6+mS\nHIteQDdN7G9NDZdusfgB1Gsa0QPD0dCA8dd6Um5U+4F5ptE2it8gcxzsx7/c\nfOh2JeoE+z8trb1aGMI8YUxe33caqWJBbTRhXAKsqjMToU4zEnPdGvF/DayV\ndPcZi1dmhpGZ/JWH2eJAwB7Ate6v1ZSgNhcqNX7pbN+cvtGAK58FUZ20W2Cn\nHFhUMNMgAb1v1yBC83RBDN16ELbfMwJzBwnESyA6c+JE2veb7Ba+hXptuM0b\nsoMH\r\n=OYMa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDfPQbIhmPpLUOCv4t5R8akAuW5ysh0sMMp78102Lo0AAiBALQvI/7FSeo4jn4RC5LZTbLrWG8DEAuVkgfmu0er7sg=="}]},"maintainers":[{"name":"bunchtogether","email":"johnwehr@bunchtogether.com"}],"_npmUser":{"name":"bunchtogether","email":"johnwehr@bunchtogether.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-systray_1.1.0_1571156705351_0.0607869658007556"},"_hasShrinkwrap":false},"1.1.1":{"name":"@bunchtogether/node-systray","version":"1.1.1","description":"An systray libray for nodejs","main":"lib/index.js","typings":"lib/index.d.ts","scripts":{"build":"run-s clean build:lib doc && git add -A","build:lib":"tsc","clean":"del ./lib/**","lint":"tslint ./src/** --type-check -p ./tsconfig.json --fix","test":"cross-env DEBUG=systray* mocha -r ts-node/register ./test/**/*.test.ts","doc":"typedoc --theme minimal --out ./docs ./src && touch ./docs/.nojekyll","cover":"cross-env NODE_ENV=development nyc ava","preversion":"npm run build && git add -A"},"engines":{"node":">=4.0.0"},"pre-commit":[],"repository":{"type":"git","url":"git+https://github.com/zaaack/node-systray.git"},"keywords":["systray","tray","gui"],"author":{"name":"zaaack"},"license":"MIT","bugs":{"url":"https://github.com/zaaack/node-systray/issues"},"homepage":"https://github.com/zaaack/node-systray#readme","devDependencies":{"@types/debug":"^0.0.30","@types/fs-extra":"^4.0.2","@types/mocha":"^5.2.0","@types/node":"^10.0.4","cross-env":"^5.0.5","del-cli":"^1.1.0","mocha":"^5.1.1","npm-run-all":"^4.0.2","nyc":"^11.2.1","pre-commit":"^1.2.2","ts-node":"^6.0.2","tslint":"^5.7.0","tslint-config-standard":"^6.0.1","typedoc":"^0.8.0","typescript":"^2.8.3"},"dependencies":{"debug":"^3.0.1","fs-extra":"^4.0.2"},"gitHead":"59f300a68926f39c0071fcd351d12dbd2af5e872","_id":"@bunchtogether/node-systray@1.1.1","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-s+fwh4lPE5tCsdAaCGpIHyBZqzFgOTWbfBQyuPRhRt7DzkA2cdT1GekC3LeLugVgFyuda4RHNUlJFkJ7ZcKIJg==","shasum":"a7ff899a2e280be3f5a53e8b0ab5c00803bde05b","tarball":"https://registry.npmjs.org/@bunchtogether/node-systray/-/node-systray-1.1.1.tgz","fileCount":31,"unpackedSize":68859420,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJhVVCRA9TVsSAnZWagAAOfkP/RV1qlpy30HXbFiuQsoH\ncFF1uQy0QcGGyJjZlr+O2f9fm/9a2jrxKbL+nJNcZn9XHW6rER1b5rOfDLSo\nQrHRmRVl+US+uMdHFPT3zVHeFoObsWYyzGVinJ7koMj17Tm7dvIWU4jZFvxl\n+7oWLBmh+Eedqd/Y4NzDv9/1LQ18fb/EkNfpqe+piu9aA0p0fKpb/zgSY1Ud\nOkF6jMWY0964FfMuWf9kMP76Nk5KHv3Qgjn8mAcmaL+hNF+QMcHBRFQgpTLm\nG5gp4sk2YRqVYH5ZtBJ25pHQjBwHM/6ccH858pKgU4ORuZagBG3dVvWAQyyQ\nsuG3jm8ycGEEQSGlgjO6Ou8Upf11CB/4N+v8VU1M3cxlpKczGCabkKhuSeA6\nwEq11f9rg/Jje/2cP7A33czCcAKMAvrjPS/CSUZk1JzOpw1PytEh8E6tkBjz\nqb5TJoNdan/j1GNmTlLxUUiPS4KLp8bQp5Mt6BpyKjgfBFdOVui0FJJpqAwv\nHG8kh54B+NJz7GCG0CffD1fNr0fY+oH/eRGTKJ2AisfM90OHopApm0s/zVxl\nj4hJI9yOVsxVwdnnCk1gv7ArPKVm0wfABLwsEBtl0OwOcRlgIPZYPiivG1+L\n7Dc9A3UJKfowHhVxFoXF6UEL0Jg9v/LVGkmLTxKqG0ITvqyG8xOHBFAkVo9I\nKgWR\r\n=oMsG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFowZCKE3Qg51awvdcPekbj7ZKz5Hq8WhpYQCspJCrSbAiEAm4tqKHmEvcQRsIQ6UW4aXI78reJkLrj4hXaKKqt0iho="}]},"maintainers":[{"name":"bunchtogether","email":"johnwehr@bunchtogether.com"}],"_npmUser":{"name":"bunchtogether","email":"johnwehr@bunchtogether.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-systray_1.1.1_1579554132684_0.5597776409482276"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-15T16:25:04.809Z","1.1.0":"2019-10-15T16:25:05.741Z","modified":"2022-04-04T21:05:41.751Z","1.1.1":"2020-01-20T21:02:13.523Z"},"maintainers":[{"name":"bunchtogether","email":"johnwehr@bunchtogether.com"}],"description":"An systray libray for nodejs","homepage":"https://github.com/zaaack/node-systray#readme","keywords":["systray","tray","gui"],"repository":{"type":"git","url":"git+https://github.com/zaaack/node-systray.git"},"author":{"name":"zaaack"},"bugs":{"url":"https://github.com/zaaack/node-systray/issues"},"license":"MIT","readme":"# node-systray\n\n> 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: \"<base64 image string>\",\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 => {\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> https://github.com/zaaack/aria2c-node-gui\n\n## License\nMIT\n","readmeFilename":"README.md"}