Releases: gogpu/systray
Releases · gogpu/systray
v0.1.0 — Pure Go System Tray for Windows, macOS, Linux
Pure Go System Tray — Windows, macOS, Linux
The first Pure Go (zero CGO) system tray library with full platform support, dark mode, notifications, and multiple tray icons.
Platform Support
| Platform | API | Status |
|---|---|---|
| Windows | Shell_NotifyIconW | ✅ Tested |
| macOS | NSStatusBar/NSStatusItem (goffi) | ✅ Compiled, needs Mac testing |
| Linux | D-Bus StatusNotifierItem (godbus) | ✅ Compiled, needs Linux testing |
Features
- Multiple tray icons per application
- Context menus with submenus, checkboxes, separators
- Click/DoubleClick/RightClick event handlers
- Balloon notifications (Windows), Notification Center (macOS), D-Bus (Linux)
- Dark mode auto-switching (Windows WM_SETTINGCHANGE + SystemUsesLightTheme)
- Template icons (macOS [NSImage setTemplate:YES])
- Explorer crash recovery (Windows TaskbarCreated message)
- Builder pattern — fluent API:
tray.SetIcon(icon).SetTooltip("App").SetMenu(menu).Show() - Run() message loop — GetMessage (Windows), NSApp run (macOS), D-Bus (Linux)
- 72 tests, 84% coverage on public API
Quick Start
go get github.com/gogpu/[email protected]tray := systray.New()
menu := systray.NewMenu()
menu.Add("Hello", func() { fmt.Println("clicked!") })
menu.AddSeparator()
menu.Add("Quit", func() { tray.Remove(); os.Exit(0) })
tray.SetIcon(iconPNG).SetTooltip("My App").SetMenu(menu).Show()
tray.Run()Dependencies
golang.org/x/sys— Windows (Shell_NotifyIconW)github.com/go-webgpu/goffi— macOS (ObjC runtime)github.com/godbus/dbus/v5— Linux (D-Bus SNI)
All Pure Go. Zero CGO. Single binary.
Help Wanted
We need testers on macOS and Linux (KDE, GNOME + AppIndicator extension, XFCE, Sway). Please try the examples and report any issues!
Part of the GoGPU Ecosystem
~790K lines of Pure Go GPU code. github.com/gogpu