{"id":18544721,"url":"https://github.com/131/trayicon","last_synced_at":"2025-09-19T10:48:35.426Z","repository":{"id":40506704,"uuid":"316009106","full_name":"131/trayicon","owner":"131","description":"node system tray trayicon helper","archived":false,"fork":false,"pushed_at":"2023-12-15T17:46:12.000Z","size":53,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T23:13:20.917Z","etag":null,"topics":["icon","icons","nodejs","systray","systray-icon","tray-icon","tray-menu"],"latest_commit_sha":null,"homepage":"","language":"C#","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/131.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}},"created_at":"2020-11-25T17:26:38.000Z","updated_at":"2024-10-18T15:33:30.000Z","dependencies_parsed_at":"2022-08-09T22:22:12.206Z","dependency_job_id":null,"html_url":"https://github.com/131/trayicon","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Ftrayicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Ftrayicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Ftrayicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Ftrayicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/trayicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223407794,"owners_count":17140563,"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","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":["icon","icons","nodejs","systray","systray-icon","tray-icon","tray-menu"],"created_at":"2024-11-06T20:17:24.976Z","updated_at":"2025-09-19T10:48:30.386Z","avatar_url":"https://github.com/131.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/131/trayicon/actions/workflows/deploy.yml/badge.svg?branch=master)](https://github.com/131/trayicon/actions/workflows/deploy.yml)\r\n[![Version](https://img.shields.io/npm/v/trayicon.svg)](https://www.npmjs.com/package/trayicon)\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\r\n[![Code style](https://img.shields.io/badge/code%2fstyle-ivs-green.svg)](https://www.npmjs.com/package/eslint-plugin-ivs)\r\n![Available platform](https://img.shields.io/badge/platform-win32-blue.svg)\r\n\r\n\r\n# Motivation\r\n[trayicon](https://github.com/131/trayicon) provide you system tray icon for your nodejs application.\r\n\r\n\r\n# Usage example\r\n```\r\nconst Tray = require('trayicon');\r\n\r\nTray.create(function(tray) {\r\n  let main = tray.item(\"Power\");\r\n  main.add(tray.item(\"on\"), tray.item(\"on\"));\r\n\r\n  let quit = tray.item(\"Quit\", () =\u003e tray.kill());\r\n  tray.setMenu(main, quit);\r\n});\r\n```\r\n\r\n\r\n# API\r\n\r\n## `(Promise \u003cTray\u003e) tray.create({icon, title, action, useTempDir} [, readyCb])`\r\nCreate a new Tray instance, return a promise / emit a callback when the trayicon is ready.\r\nIf defined, `action` callback is triggered when double clicking the tray.\r\nSet `useTempDir` to `true` or `\"clean\"` to copy executable files to temporary directory (`clean` removes temp files on `tray.kill()`). Allows using the package with [pkg](https://www.npmjs.com/package/pkg).\r\n\r\n## `(void) tray.setTitle(tray title)`\r\nSet the systray title.\r\n\r\n## `(void) tray.setIcon(binary icon buffer)`\r\nSet the systray icon.\r\n\r\n## `(void) tray.notify(\"Some title\", \"Some message\")`\r\nDisplay a notification balloon.\r\n\r\n## `(void) tray.setMenu(...items)`\r\nSet the systray menu.\r\n\r\n## `(Item) tray.item(\"foo\", { ?checked : boolean, ?disabled : boolean, ?bold : boolean, ?action : `function`})`\r\nCreate a menu item. If defined, the `action` callback is triggered when the item is selected. \r\n\r\n## `(void) parentItem.add(...childrenItems)`\r\nCreate a submenu of childrenItems under parentItem.\r\n\r\n## `(Item) tray.separator()`\r\nCreate an item of type \"separator\"\r\n\r\n\r\n## Extra features\r\n* Work when running node as SYSTEM\\NT authority (*trayicon* will fallback to interactive session if needed)\r\n\r\n\r\n# Credits \r\n* [131](https://github.com/131)\r\n* [murrayju](https://github.com/murrayju/CreateProcessAsUser)\r\n* Code signing, courtesy of IVS Group.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Ftrayicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Ftrayicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Ftrayicon/lists"}