Erik's Engineering

something alliterative

Quick Growl Notifications

If you're using a Mac, you probably have growl running.

Did you know you can use it to get notifications whenever any kind of script finishes running?  Pop-ups when specs and deployments finish can be really handy.

First, open up a terminal and see if you already have the growlnotify program.  If not, you'll need to install it.  Luckily, it comes in the "extras" folder within the main Growl distribution.  Just run the growlnotify package installer to get it.

growl package


growlnotify installer

Once you've got it installed, all you need to do to get a notification after running something is append a growlnotify command line after the command.  Something like this:

rake spec ; growlnotify -s -m "specs are done!"

The semi-colon after rake spec tells it to run the second command unconditionally after rake finishes.  -s tells it to make the notification sticky - that way it'll stay on screen so you see it even if you've looked away right when specs finish. Otherwise you might end up assuming they're still running when they aren't.  -m lets you specify a message for the growl window.

And that's it.  No code changes.  No programming at all and you can safely switch contexts to check your mail, visit stackoverflow or whatever and you'll still know when the specs finish.

Published on 09/01/2011 at 16h46 .

Comment Quick Growl Notifications

Trackbacks are disabled

Powered by Typo – Thème Frédéric de Villamil | Photo Glenn