Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you're running a modern Linux desktop, you should have a "notify-send" command which will cause a message to be displayed by your desktop-environment's pop-up notification system (on Ubuntu, this command is in the libnotify-bin package). I have two scripts I keep around which I call "notify-success" and "notify-failure":

notify-success:

    notify-send --icon=gtk-dialog-info Success! "$*"
notify-failure:

    notify-send --icon=gtk-dialog-warning Failure! "$*"
When I want to run a long-running command and don't want to have to keep checking on it, I'll do something like this:

    make -j3 && notify-success "Build complete" || notify-failure "Build failed"


With tmux, you can monitor the window for activity (^A M) and do:

  make -j3 >make.log 2>&1 ; echo $?
When make finishes, your prompt is printed again (activity!) and the window's caption is highlighted. I use the same mechanism to watch for new mail and chats in other windows. It's like Growl for your terminal.


I just have a script called 'bell': echo -n "\a"

My terminal (urxvt) will detect the bell and set the 'urgent' flag on the window, which is detected by Awesome, which sets the appropriate tag* icon to red.

* Tag in Awesome is more or less akin to a virtual desktop.


I do just that, but I also add audible notifications using "play" for when I am not looking at the screen.

Use "--expire-time" argument to "notify-send" to control how long the message is displayed.


I just use a few aliased beep sequences so I can have an audio notification. I never have much need for more than a few at a time, so I've only written three such aliased beep tunes. Well, four really, I always have a special keyboard shortcut set to immediately run the one named "little_melody". By pressing down... well you get the idea.


On a mac I use the `say` command.

    make && say "I'm done."


On a mac, you could also use growlnotify.

    growlnotify -m "Hey I am done!" -t "Done!"


Also useful is the `-s` option to make the notification sticky

    growlnotify -s -t 'Done!' -m 'And I'm not going away until you click me'




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

Search: