diff options
| author | Gabriel Handford | 2016-05-19 11:34:14 -0700 |
|---|---|---|
| committer | Gabriel Handford | 2016-05-19 11:34:14 -0700 |
| commit | 17405ab3fd75474562f921a58715a50ca28f1b5a (patch) | |
| tree | b8d0cd924f25bcf1a2f99fbe99fd56f1dffc5308 /README.md | |
| parent | 32894e6239f4d92e5b94da58ea04a7da2a3ea9d9 (diff) | |
| download | go-notifier-master.tar.bz2 | |
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -21,6 +21,31 @@ go install github.com/keybase/go-notifier/notifier If you need alert style (actionable) notifications (on OS X), you need to include an Info.plist in the binary and sign it. You can look at `build_darwin.sh` on how to do this. +### Examples (OS X) + +#### Notification with single action + +``` +notifier --title="Hi" --message="Test message" --bundle-id=keybase.Electron --timeout=20 --action=Close +``` + +If action is chosen, you get output (stdout): +``` +{"type":"action","action":"Close"} +``` + +If the notification contents are clicked, +``` +{"type":"clicked"} +``` + +#### Notification with multiple actions + +``` +notifier --title="Hi" --message="Test message" --bundle-id=keybase.Electron --timeout=20 --action=Close --action="Install" --action="Ignore" +``` + + ### Resources Follows similar requirements of [node-notifier](https://github.com/mikaelbr/node-notifier), |
