

Using iTerm2 with Growl for Notifications - smm2000
http://www.sergeymarkov.com/blog/2013/07/using-iterm-and-growl/

======
mbell
If you're on 10.8 and want to use the built in notification center:

    
    
        gem install terminal-notifier
        make; terminal-notifier -title "Make" -message "Done compiling..." 
    

You can of course wrap that in a bash function to make it a bit shorter just
as the TFA does.

~~~
syncerr
When using terminal-notifier, use the -group ID and -remove ID together --
otherwise, the swipe-to-notification-area gets cluttered. Alternatively, do a
sleep and close it automatically.

------
syncerr
There is an automatic way of doing this is OSX[1]. You may also want to use
terminal-notifier instead of growl[2]. My experience was that the bash prompt
became too slow. However, results seem to vary.

____

[1]
[http://tech.superhappykittymeow.com/?p=332](http://tech.superhappykittymeow.com/?p=332)

[2] [https://github.com/alloy/terminal-
notifier](https://github.com/alloy/terminal-notifier)

~~~
smm2000
Good thing about bash script is that it works when you compile on remote Linux
machine. terminal-notifier works only if you development is completely on Mac.

------
rohanprabhu
I am often using headphones while I work, so I just use the following

    
    
        make; say "Make has finished running"

------
nfoz
Popup notifications are a horrible idea, and they're a horrible idea in every
OS in which they're implemented.

Especially so in MacOS X where there's already dedicated space where
notificiations could choose to appear, rather than popping up. I think Growl
should see if it can incorporate itself into the top-bar instead.

~~~
tazjin
Growl is integrated into OS X's notification center (which provides popup
notifications).

I would actually like to have the old Growl back (Notification Center is
completely disabled on most of my machines because I find it horribly
annoying, whenever I open it it's full of months old notifications because it
does not have a proper "read item"-mechanism. In addition to that once you
unload it you will never see the OS X Update notification (Oh how I hate it)
ever again.)

------
Aloha
Uhh.. couldnt you use make; echo -en "\007" to trigger the terminal bell?

It seems so much less complex.

------
valbaca
You can also have iTerm take actions (like ringing a bell) when it finds a
match for a regular expression (like username@ in your shell prompt). The
advantage here is that you can be alerted even if you're ssh'd into another
machine. No growl needed.

~~~
smm2000
Provided script also works ssh'd into another machine. Main downside of using
iTerm match is that it fires up when you scroll up/down or just do cat and
that string is present. Annoying.

------
jevin
This post makes Gowl look like a very good investment.

For now, I use "say boom" to get notified of command completions. The boom
sound is funny when coupled with errors. ;-)

------
jankins
I do something similar (on osx): make; say "done compiling"

~~~
mbell
Completely off topic but you just made my day, I had no idea 'say' existed. I
now plan to have much fun working that into some workflow scripts.

~~~
marceldegraaf
You should check out the various available voices, selectable with the "-v"
switch. While you're at it, let it sing In The Hall Of The Mountain King for
you:

    
    
      say -v Cellos Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo

~~~
Watabou
Haha, this is brilliant!

Thanks for the laugh!

