diff --git a/README.md b/README.md index d6e106a1..ad1f7e86 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ +# systray + systray is a cross-platform Go library to place an icon and menu in the notification area. ## Features * Supported on Windows, macOS, and Linux * Menu items can be checked and/or disabled -* Methods may be called from any Goroutine +* Most functions may be called from any goroutine ## API @@ -49,15 +51,6 @@ On Windows, you should build like this: env GO111MODULE=on go build -ldflags "-H=windowsgui" ``` -The following text will then appear on the console: - - -```sh -go: finding github.com/skratchdot/open-golang latest -go: finding github.com/getlantern/systray latest -go: finding github.com/getlantern/golog latest -``` - Now look for *Awesome App* in your menu bar! ![Awesome App screenshot](example/screenshot.png) diff --git a/systray.go b/systray.go index 8fe9d163..cd5ae283 100644 --- a/systray.go +++ b/systray.go @@ -71,8 +71,8 @@ func newMenuItem(title string, tooltip string, parent *MenuItem) *MenuItem { } } -// Run initializes GUI and starts the event loop, then invokes the onReady -// callback. It blocks until systray.Quit() is called. +// Run initializes GUI and starts the event loop, then invokes the onReady callback. It blocks until +// systray.Quit() is called. It must be run from the main thread on macOS. func Run(onReady func(), onExit func()) { Register(onReady, onExit) nativeLoop() @@ -106,7 +106,7 @@ func Register(onReady func(), onExit func()) { registerSystray() } -// Quit the systray +// Quit the systray. This can be called from any goroutine. func Quit() { quitOnce.Do(quit) }