I often launch a long running command (e.g. a build or firmware upgrade), then wander off to another virtual desktop to take care of a few small tasks while I'm waiting for the command to complete. Unfortunately those "little tasks" tend to suck me in and I forget that I was just filling in time while waiting for something.
Adding the function below to my zshrc makes it so that I can do things
like lr make check
and have a dialog pop up in my face when it's done
-- even when I'm ssh'd to a VM or a remote machine. (Assuming I've used
ssh -X remote
.)
function lr() { $* if [[ $? == 0 ]] then success=succeeded else success=failed fi zenity --info --text "command $success: $1" }