Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
Fixes #209.
  • Loading branch information
anacrolix committed Sep 2, 2023
1 parent 39a03a7 commit a47cb5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions systray.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit a47cb5b

Please sign in to comment.