-
-
Save OrangeTux/5cd6f3d53f8c8d75dcdd to your computer and use it in GitHub Desktop.
Notification function. Add it to your .zshrc.
This file contains hidden or 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
# Send notification when command has finished. | |
# Usage: | |
# n <command> | |
# | |
# Lets say you want to build something that takes a certain time: | |
# n make | |
n() { | |
"$@" | |
RETVAL=$? | |
URGENCY="normal" | |
[ $RETVAL -ne 0 ] && URGENCY="critical" | |
notify-send -u $URGENCY -t 10000 "Command '$@' has finished" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment