A cross-platform Go library for adding system tray icons and menus to applications.
Systray is a cross-platform Go library that allows developers to add system tray icons and menus to their applications. It provides a simple API for creating native notification area entries on Windows, macOS, and Linux, solving the need for persistent system-level UI components in desktop utilities and background apps.
Go developers building cross-platform desktop applications, utilities, or tools that require system tray integration, such as background services, monitoring apps, or lightweight system utilities.
Developers choose Systray for its minimal Go API, native cross-platform support, and concurrency-friendly design, making it easier to add professional system tray functionality without dealing with low-level platform details.
a cross platfrom Go library to place an icon and menu in the notification area
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a unified API for Windows, macOS, and Linux with native look and feel, as the README states it's 'Supported on Windows, macOS, and Linux', handling platform complexities internally.
Most functions can be safely called from any goroutine, making it easy to integrate with Go's concurrent programming model without synchronization headaches, as highlighted in the features.
Offers a minimal, idiomatic interface with clear functions like systray.Run and AddMenuItem, reducing boilerplate and learning curve, as demonstrated in the example code.
Includes options such as macOS icon removal with SetRemovalAllowed and Windows console hiding via ldflags, allowing fine-tuned behavior per OS as detailed in platform notes.
Requires cgo to be enabled (CGO_ENABLED=1), which complicates cross-compilation and builds, especially for environments where pure Go is preferred, as explicitly warned in the README.
Each OS has cumbersome requirements: Linux needs gcc and GTK3/ayatana headers, macOS requires app bundle creation, and Windows needs special ldflags, increasing initial setup time.
Some features, like setting menu item icons, are only available on Mac and Windows, not Linux, leading to cross-platform inconsistencies as noted in the API example with 'Only available on Mac and Windows.'
The webview example has restrictions, such as not working on macOS versions older than 10.15 Catalina, indicating challenges in combining systray with other UI frameworks for richer applications.