by thristian · 15y ago · 0 comments
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" 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.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.
Use "--expire-time" argument to "notify-send" to control how long the message is displayed.
make && say "I'm done." growlnotify -m "Hey I am done!" -t "Done!" growlnotify -s -t 'Done!' -m 'And I'm not going away until you click me'