Just a thought, one option might be to use a display style in growl that would give you something to script off of.
So for notifications you want to have fire scripts just choose "MailMe" as the display style and then set up rules in mail.app that would let you respond to certain alerts coming from growl by firing off their related scripts.
You can install growlnotify to do this.
$ ./some_program && growlnotify Title -m Message
Of course you would need to think of this before performing your command. The alternative (I don't know how to achieve this though) would be a Growl notification for every single command, which would be insanely annoying.
To simplify use of growlnotify for your use case, edit ~/bash_profile
and add the following:
function long {
$@
/usr/local/bin/growlnotify Finished -m 'Done'
}
now you can simply long your_command
(similar to sudo
). Ctrl-A
positions the cursor at the beginning of the line, if you (like me) always type the actual command first and need to add the prefix afterwards.
My bash-fu is unfortunately insufficient to be able to add the command to the growlnotify
message
per @mankoff's comment to this answer:
You can simply type while the command is running, it gets executed afterwards. I created the following function for me:
function gn {
/usr/local/bin/growlnotify Finished -m "$@"
}
Use as gn svn
.
Best Answer
Here's an alternative implementation along the same vein of Jonno's one: https://github.com/BobVul/GrowlToToast/blob/master/README.md
The basic principle is the same, but this also sends the original title as sent by the Growl source, and supports a 'silent mode' that stops the Windows 10 notification sound.
Installation
See the Installation instructions in the README. This has changed across different versions.