-
-
Save liuw/debc17c341b6dedc7c613b24843385ad to your computer and use it in GitHub Desktop.
A script to run a command then notify completion
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
#!/bin/sh | |
# Uses notify-send command. | |
# Install ruby-notify on Debian | |
"$@" | |
ret=$? | |
cmd="$@" | |
lvl=normal | |
if [ $ret -ne 0 ]; then lvl=critical; fi | |
notify-send -u $lvl "$$" "$cmd" | |
exit $ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment