blob: a98417c6c66b7453979fdb3e6a2ff5d05363fa82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
## go-notifier
Cross platform system notifications in go (golang).
### Platforms
For OS X, we use NSUserNotificationCenter APIs from cgo. This only supports OS X 10.9 and above.
For Windows, we use [toaster](https://github.com/nels-o/toaster). This only supports Windows 8 and above.
For Linux, we use [notify-send](http://man.cx/notify-send).
### Install
```sh
go install github.com/keybase/go-notifier/notifier
```
### Resources
Follows similar requirements of [node-notifier](https://github.com/mikaelbr/node-notifier),
but only supports recent platform versions.
Instead of [deckarep/gosx-notifier](https://github.com/deckarep/gosx-notifier), which uses an embedded version of [terminal-notifier](https://github.com/julienXX/terminal-notifier),
this implementation uses cgo to talk directly to NSUserNotificationCenter APIs. It is also possible to use AppleScript APIs to generate notifications (see [this post](https://apple.stackexchange.com/questions/57412/how-can-i-trigger-a-notification-center-notification-from-an-applescript-or-shel/115373#115373)),
but a cgo implementation was preferable.
The [0xAX/notificator](https://github.com/0xAX/notificator) only supports growlnotify on Windows and OS X.
|