{"id":13733387,"url":"https://github.com/tetsuo/xtray","last_synced_at":"2026-02-04T17:04:18.714Z","repository":{"id":35397433,"uuid":"39661529","full_name":"tetsuo/xtray","owner":"tetsuo","description":"create minimal tray apps on osx","archived":false,"fork":false,"pushed_at":"2015-08-03T22:42:23.000Z","size":132,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-21T07:47:40.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tetsuo.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-24T22:40:26.000Z","updated_at":"2022-08-18T15:33:56.000Z","dependencies_parsed_at":"2022-09-19T16:01:32.750Z","dependency_job_id":null,"html_url":"https://github.com/tetsuo/xtray","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsuo%2Fxtray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsuo%2Fxtray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsuo%2Fxtray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsuo%2Fxtray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tetsuo","download_url":"https://codeload.github.com/tetsuo/xtray/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234970023,"owners_count":18915304,"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":[],"created_at":"2024-08-03T03:00:42.255Z","updated_at":"2025-10-06T07:31:36.798Z","avatar_url":"https://github.com/tetsuo.png","language":"C++","readme":"# xtray\n\ncreate minimal tray apps on osx.\n\n![screenshot](http://i.imgur.com/gVCZMN7.png)\n\n**Note: Swift 1.2 is no longer supported, so this module doesn't compile anymore. You can port the Swift part to Obj-C or look into the new Swift syntax if you really need to get this working.**\n\n# example\n\n```js\nvar xtray = require('xtray');\n\nxtray({\n  name: 'Demo',\n  icon: __dirname + '/icon.pdf'\n}, function onlaunch () {\n  console.log('launched');\n  setInterval(function () {\n    console.log('loop is safe');\n  }, 1000);\n}, function onquit () {\n  console.log('will quit');\n});\n```\n\n# api\n\n```js\nvar xtray = require('xtray')\n```\n\n## xtray(opts, [onlaunch, onquit])\n\nCreates and launches the application.\n\n`opts` object can have these properties:\n\n- `icon` must be a pdf file, see [example/icon.pdf](example/icon.pdf) for an example\n- `name` is the tooltip, the text which appears when you hover over the icon, and it is also appended to \"Quit\" text\n\nYou can provide the `onlaunch` callback that will be dispatched _after_ the application is finished launching. This doesn't block node.js i/o.\n\nA `Quit [name]` menu item is added by default. There is no explicit terminate method; you can provide the `onquit` callback that will be dispatched _before_ the application quits.\n\n# building\n\nThis is indeed a super minimal demonstration of building a simple node.js ⇆  Swift bridge using objc runtime. Requires a Xcode build (\u003e=6.3-beta) which is capable of compiling Swift 1.2.\n\n# packaging\n\nNow, I haven't yet tested packaging a Swift framework, but it seems Xcode makes sure linked dependencies are also copied into `build` folder. I have tweaked search paths, so it should be safe to pack up `node_modules` as it is- greatly appreciated if you can open an issue if something goes wrong.\n\n# license\n\nmit","funding_links":[],"categories":["System Tray"],"sub_categories":["Flexbox"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetsuo%2Fxtray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftetsuo%2Fxtray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetsuo%2Fxtray/lists"}