Hacker News new | past | comments | ask | show | jobs | submit login
Using iTerm2 with Growl for Notifications (sergeymarkov.com)
27 points by smm2000 on July 15, 2013 | hide | past | favorite | 16 comments



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.


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.


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

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


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.


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

    make; say "Make has finished running"


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.


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.)


A "horrible" idea? Explain plz...


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.


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.


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

It seems so much less complex.


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


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.


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


Haha, this is brilliant!

Thanks for the laugh!


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. ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: