Skip to content

Instantly share code, notes, and snippets.

@Semmu
Created July 14, 2017 22:30
Show Gist options
  • Save Semmu/a09ae9a5e65e2141c7bcccc14b3b2c1c to your computer and use it in GitHub Desktop.
Save Semmu/a09ae9a5e65e2141c7bcccc14b3b2c1c to your computer and use it in GitHub Desktop.
Small convenience function to notify when a long running command finishes
# small convenience function to notify when a long running command finishes
#
# usage:
# shout [full command with arguments and whatnot]
#
# eg. shout sudo apt update
#
function shout {
cmd=$@
(( eval $cmd ) && notify-send -i dialog-information "Command successful" "\"$cmd\"" )
|| ( notify-send -i dialog-error "Command error!" "\"$cmd\"" )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment