Last active
August 9, 2018 15:23
-
-
Save chrisdone/b69c9a0987b2d0f7da587a650e3f0262 to your computer and use it in GitHub Desktop.
Wrap stack with notify send
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
| #!/bin/bash | |
| SECONDS=0 | |
| cmd="stack $@" | |
| /home/chris/.local/bin/stack-bin "$@" | |
| result="$?" | |
| if [ "$SECONDS" -gt 0 ]; then | |
| if [ "$result" -eq 0 ]; then | |
| notify-send -u normal -t 1000 "Stack completed successfully" "$cmd" | |
| else | |
| notify-send -u critical -t 1000 "Stack command failed" "$cmd" | |
| fi | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment