julienXX / terminal-notifier

Send User Notifications on macOS from the command-line.
Other
6.38k stars 330 forks source link

buttons text #157

Closed 1-61803 closed 8 years ago

1-61803 commented 8 years ago

Add the option to change the text of buttons to something else than 'Close' or 'Show'.

julienXX commented 8 years ago

You can now do this with the latest 1.7.0 release.

1-61803 commented 8 years ago

Great. Is this supported on 10.8?

julienXX commented 8 years ago

Unsure if you have a 10.8 box I'd be glad to know.

1-61803 commented 8 years ago

I just checked the examples on the README

$ echo 'Piped Message Data!' | terminal-notifier-1.7.0/terminal-notifier.app/Contents/MacOS/terminal-notifier -sound default
@CONTENTCLICKED$ 
$ 
$ echo 'Piped Message Data!' | terminal-notifier-1.7.0/terminal-notifier.app/Contents/MacOS/terminal-notifier -sound default
@CLOSED$ 
$ 
$ terminal-notifier-1.7.0/terminal-notifier.app/Contents/MacOS/terminal-notifier -message "Deploy now on UAT ?" -actions Now,"Later today","Tomorrow" -dropdownLabel "When ?"
2016-10-02 11:28:20.198 terminal-notifier[88419:707] [<_NSConcreteUserNotification 0x7f8ac1456dc0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key _showsButtons.
^C
$ terminal-notifier-1.7.0/terminal-notifier.app/Contents/MacOS/terminal-notifier -title ProjectX -subtitle "new tag detected" -message "Deploy now on UAT ?" -closeLabel No -actions Yes -appIcon http://vjeantet.fr/images/logo.png
2016-10-02 11:28:52.480 terminal-notifier[88515:707] [<_NSConcreteUserNotification 0x7f88bc087fc0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key _showsButtons.
^C
$ terminal-notifier-1.7.0/terminal-notifier.app/Contents/MacOS/terminal-notifier -title '💰' -message 'Check your Apple stock!' -open 'http://finance.yahoo.com/q?s=AAPL'
$ 
$ terminal-notifier-1.7.0/terminal-notifier.app/Contents/MacOS/terminal-notifier -group 'address-book-sync' -title 'Address Book Sync' -subtitle 'Finished' -message 'Imported 42 contacts.' -activate 'com.apple.AddressBook'
@CONTENTCLICKED$ 
$ 

So buttons text and dropdown don't seem to work. I hope you can find a workaround.

julienXX commented 8 years ago

@1-61803 so the reply feature is working but the actions are not if I understand correctly?

1-61803 commented 8 years ago

I haven't tested reply (actually I overlooked this in the README). Actions don't work, is it GUI related?

julienXX commented 8 years ago

@1-61803 not sure but I think OSX 10.8 may be lacking the necessary APIs.

1-61803 commented 8 years ago

Yeah, Notifications changed a bit between 10.8 and 10.9. Any workarounds?