Monday, April 04, 2011

ITerm2 - Growl Notification

As a heavy user of the Mac command line toolset, I spend a lot of time logged into remote machines. I've been an avid ITerm user for a long time, it allows me to have radically different looking consoles for QA/EA/Production machines.

I was reading on changes in ITerm2 to allow console commands to use Growl Notifications (including from remote machine). Typical use case would be a large data import/build etc - followed by growl telling you he jobs complete.

One quick spot - the blog above talks about the Growl settings being in Iterm2/Preferences/Advanced - on the nightly I am using they are in Iterm2/Preferences/General/Services.

Add the following to .bash_profile :

growl() { echo -e $'\e]9;'${1}'\007' ; return ; }

You can then perform actions like  :

ant bigTarget; growl "Big Target Complete"

This has the advantage over using something like the say command in that it will update your local growl even if running on a remote box.

No comments: