{"id":13413151,"url":"https://github.com/getlantern/systray","last_synced_at":"2026-10-18T20:30:04.933Z","repository":{"id":23162178,"uuid":"26517837","full_name":"getlantern/systray","owner":"getlantern","description":"a cross platfrom Go library to place an icon and menu in the notification area","archived":false,"fork":false,"pushed_at":"2024-07-03T04:41:06.000Z","size":55069,"stargazers_count":3733,"open_issues_count":114,"forks_count":539,"subscribers_count":60,"default_branch":"master","last_synced_at":"2026-10-05T06:58:44.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getlantern.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-11-12T03:41:57.000Z","updated_at":"2026-10-03T06:22:30.000Z","dependencies_parsed_at":"2024-09-21T03:00:46.201Z","dependency_job_id":"fe57cf67-20be-4052-8ebe-974abe14679d","html_url":"https://github.com/getlantern/systray","commit_stats":{"total_commits":150,"total_committers":32,"mean_commits":4.6875,"dds":0.7066666666666667,"last_synced_commit":"d57f43fe06ae79bce7ad747fe2d338e77839e9b5"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/getlantern/systray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fsystray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fsystray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fsystray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fsystray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getlantern","download_url":"https://codeload.github.com/getlantern/systray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlantern%2Fsystray/sbom","scorecard":{"id":424403,"data":{"date":"2025-08-11","repo":{"name":"github.com/getlantern/systray","commit":"22c167e80905f87867fc05fbe553342578976d7b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":4,"reason":"Found 10/22 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: example/example_windows_386.exe:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: goCommand not pinned by hash: example/icon/make_icon.sh:10","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T01:56:41.582Z","repository_id":23162178,"created_at":"2025-08-19T01:56:41.582Z","updated_at":"2025-08-19T01:56:41.582Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38341188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-18T02:00:06.448Z","response_time":63,"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-07-30T20:01:34.167Z","updated_at":"2026-10-18T20:30:04.024Z","avatar_url":"https://github.com/getlantern.png","language":"Go","funding_links":[],"categories":["Go","HarmonyOS","开源类库","GUI","Open source library","User Interface","\u003cspan id=\"gui\"\u003eGUI\u003c/span\u003e","Relational Databases"],"sub_categories":["Windows Manager","桌面开发","Search and Analytic Databases","Advanced Console UIs","高級控制台界面","Desktop Development","GUI Toolkits","检索及分析资料库","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","SQL 查询语句构建库","高级控制台界面"],"readme":"# systray\n\nsystray is a cross-platform Go library to place an icon and menu in the notification area.\n\n## Features\n\n* Supported on Windows, macOS, and Linux\n* Menu items can be checked and/or disabled\n* Most functions may be called from any goroutine\n\n## API\n\n```go\nfunc main() {\n\tsystray.Run(onReady, onExit)\n}\n\nfunc onReady() {\n\tsystray.SetIcon(icon.Data)\n\tsystray.SetTitle(\"Awesome App\")\n\tsystray.SetTooltip(\"Pretty awesome超级棒\")\n\tmQuit := systray.AddMenuItem(\"Quit\", \"Quit the whole app\")\n\n\t// Sets the icon of a menu item. Only available on Mac and Windows.\n\tmQuit.SetIcon(icon.Data)\n}\n\nfunc onExit() {\n\t// clean up here\n}\n```\n\nSee [![full API](https://pkg.go.dev/badge/github.com/getlantern/systray.svg)](https://pkg.go.dev/github.com/getlantern/systray) as well as [CHANGELOG](https://github.com/getlantern/systray/tree/master/CHANGELOG.md).\n\nNote: this package requires cgo, so make sure you set `CGO_ENABLED=1` before building.\n\n## Try the example app!\n\nHave go v1.12+ or higher installed? Here's an example to get started on macOS:\n\n```sh\ngit clone https://github.com/getlantern/systray\ncd systray/example\nenv GO111MODULE=on go build\n./example\n```\n\nOn Windows, you should build like this:\n\n```\nenv GO111MODULE=on go build -ldflags \"-H=windowsgui\"\n```\n\nNow look for *Awesome App* in your menu bar!\n\n![Awesome App screenshot](example/screenshot.png)\n\n## The Webview example\n\nThe code under `webview_example` is to demostrate how it can co-exist with other UI elements. Note that the example doesn't work on macOS versions older than 10.15 Catalina.\n\n## Platform notes\n\n### Linux\n\n* Building apps requires gcc as well as the `gtk3` and `libayatana-appindicator3` development headers to be installed. For Debian or Ubuntu, you may install these using:\n\n```sh\nsudo apt-get install gcc libgtk-3-dev libayatana-appindicator3-dev\n```\n\nOn Linux Mint, `libxapp-dev` is also required.\n\nIf you need to support the older `libappindicator3` library instead, you can pass the build flag `legacy_appindicator`\nwhen building. For example:\n\n```\ngo build -tags=legacy_appindicator\n```\n\nTo build `webview_example`, you also need to install `libwebkit2gtk-4.0-dev` and remove `webview_example/rsrc.syso` which is required on Windows.\n\n### Windows\n\n* To avoid opening a console at application startup, use these compile flags:\n\n```sh\ngo build -ldflags -H=windowsgui\n```\n\n### macOS\n\nOn macOS, you will need to create an application bundle to wrap the binary; simply folders with the following minimal structure and assets:\n\n```\nSystrayApp.app/\n  Contents/\n    Info.plist\n    MacOS/\n      go-executable\n    Resources/\n      SystrayApp.icns\n```\n\nWhen running as an app bundle, you may want to add one or both of the following to your Info.plist:\n\n```xml\n\u003c!-- avoid having a blurry icon and text --\u003e\n\t\u003ckey\u003eNSHighResolutionCapable\u003c/key\u003e\n\t\u003cstring\u003eTrue\u003c/string\u003e\n\n\t\u003c!-- avoid showing the app on the Dock --\u003e\n\t\u003ckey\u003eLSUIElement\u003c/key\u003e\n\t\u003cstring\u003e1\u003c/string\u003e\n```\n\nConsult the [Official Apple Documentation here](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1).\n\nOn macOS, it's possible to set the underlying\n[`NSStatusItemBehavior`](https://developer.apple.com/documentation/appkit/nsstatusitembehavior?language=objc)\nwith `systray.SetRemovalAllowed(true)`. When enabled, the user can cmd-drag the\nicon off the menu bar.\n\n## Credits\n\n- https://github.com/xilp/systray\n- https://github.com/cratonica/trayhost\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlantern%2Fsystray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetlantern%2Fsystray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlantern%2Fsystray/lists"}