trayhost alternatives and similar packages
Based on the "GUI" category.
Alternatively, view trayhost alternatives based on common mentions on social networks and blogs.
-
webview
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows) -
qt
Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly -
app
A package to build progressive web apps with Go programming language and WebAssembly. -
go-astilectron
Build cross platform GUI apps with GO and HTML/JS/CSS (powered by Electron) -
systray
a cross platfrom Go library to place an icon and menu in the notification area -
sciter
Sciter: the Embeddable HTML/CSS/JS engine for modern UI development -
nuklear
This project provides Go bindings for nuklear.h — a small ANSI C GUI library. -
Guark
Build awesome Golang desktop apps and beautiful interfaces with Vue.js, React.js, Framework 7, and more... -
gosx-notifier
gosx-notifier is a Go framework for sending desktop notifications to OSX 10.8 or higher -
gowd
Build cross platform GUI apps with GO and HTML/JS/CSS (powered by nwjs) -
go-thrust
Cross Platform UI Kit powered by Blink/V8/Chromium Content Lib -
one-file-pdf
A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports. -
mac-activity-tracker
A library to notify about any (pluggable) activity on your machine, and let you take action as needed -
go-appindicator
:traffic_light: Go bindings for libappindicator3 C library -
AppIndicator Go
:traffic_light: Go bindings for libappindicator3 C library -
gio
Gio is a library for writing cross-platform immediate mode GUI-s in Go. Gio supports all the major platforms: Linux, macOS, Windows, Android, iOS, FreeBSD, OpenBSD and WebAssembly.
TestGPT | Generating meaningful tests for busy devs
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of trayhost or a related project?
Popular Comparisons
README
trayhost
Package trayhost is a cross-platform Go library to place an icon in the host operating system's taskbar.
Platform Support
- macOS - Fully implemented and supported by @dmitshur.
- Linux - Partially implemented, but unsupported (needs an owner/maintainer).
- Windows - Partially implemented, but unsupported (needs an owner/maintainer).
Notes
On macOS, for Notification Center user notifications to work, your Go binary that
uses trayhost
must be a part of a standard macOS app bundle.
Most other functionality of trayhost
will be available if the binary is not a part
of app bundle, but you will get a terminal pop up, and you will not be able to
configure some aspects of the app.
Here's a minimal layout of an app bundle:
$ tree "Trayhost Example.app"
Trayhost\ Example.app
└── Contents
├── Info.plist
├── MacOS
│ └── example
└── Resources
└── Icon.icns
Here's a minimal Info.plist
file as reference (only the entries that are needed,
nothing extra):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>example</string>
<key>CFBundleIconFile</key>
<string>Icon</string>
<key>CFBundleIdentifier</key>
<string>ExampleApp</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>LSUIElement</key>
<string>1</string>
</dict>
</plist>
-
CFBundleIdentifier
needs to be set to some value for Notification Center to work. - The binary must be inside
Contents/MacOS
directory for Notification Center to work. -
NSHighResolutionCapable
to enable Retina mode. -
LSUIElement
is needed to make the app not appear in Cmd+Tab list and the dock while still being able to show a tooltip in the menu bar.
On macOS, when you run an app bundle, the working directory of the executed process
is the root directory (/
), not the app bundle's Contents/Resources
directory.
Change directory to Resources
if you need to load resources from there.
ep, err := os.Executable()
if err != nil {
log.Fatalln("os.Executable:", err)
}
err = os.Chdir(filepath.Join(filepath.Dir(ep), "..", "Resources"))
if err != nil {
log.Fatalln("os.Chdir:", err)
}
Installation
go get -u github.com/shurcooL/trayhost