3 ms·
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-u
by thristian 15y ago
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"
- sunburnt 15y agoI 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.
- icebraining 15y agoI 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.
- xtacy 15y agoOn a mac, you could also use growlnotify. growlnotify -m "Hey I am done!" -t "Done!"
- LiveTheDream 15y agoAlso 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'
- sigil 15y agoWith 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.
- jankassens 15y agoOn a mac I use the `say` command. make && say "I'm done."
- nooneelse 15y agoI 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.