I've recently discovered notify-send, which opens up a notification window, so I can do things like:
compile && notify-send "Done!" || notify-send "Failed"
This made me thing that maybe I want to create a variable:
export NS="&& notify-send \"Done!\" || notify-send \"Failed\""
and then I could easily add it to many command lines for which I want notifications:
compile $NS
send-big-file $NS
start-a-heavy-job $NS
etc. But this obviously doesn't work as it is, and I can't seem to be able to come up with the right combination of variable substitutions to make it work... any ideas?