To enable the Growl notification, Go to Preferences->AdvancedSettings, Check the Enable Growl notifications.
To initiate Growl events from the command line in iTerm with:
echo $'\e]9;Growl Notification\007'
The example shows how to get an alert after a long make. I know I would never remember that command so I wrote a little Bash user defined function to do the same. Add this to ~/.bash_profile file:
growl() { echo -e $'\e]9;'${1}'\007' ; return ; }
Now the command to initiate a notification would be:
make; growl "make done"
Reference:
http://sites.google.com/site/iterm2home/
http://code.google.com/p/iterm2/
http://widgetterm.sourceforge.net/












5 意見:
But what do you do when the command you want to run is remote?
Simple: Terminal Bell. Make iTerm send Growl alerts for Terminal Bells then run your command like this:
make; echo ^G
where ^G is a control character obtained with Ctrl+v, Ctrl+g
I have not tried the command run in remote. Do you have idea on it.
Use this to give multi words arguments without requiring quotes:
growl() { echo -e $'\e]9;'${*}'\007' ; return ; }
Does Growl still work for iTerm 2 on OS X Lion?
I just upgraded today to 10.7.2 from Snow Leopard, and Growl no longer seems to be working for me.
I'm using iTerm 1.0.0.20111020 and Growl 1.2.2.
I couldn't make this work, but there is (now) a utility called 'growlnotify' to do the same thing: http://growl.info/extras.php
張貼意見