Created
July 14, 2017 22:30
-
-
Save Semmu/a09ae9a5e65e2141c7bcccc14b3b2c1c to your computer and use it in GitHub Desktop.
Small convenience function to notify when a long running command finishes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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