Skip to content

Instantly share code, notes, and snippets.

@chrisdone
Last active August 9, 2018 15:23
Show Gist options
  • Select an option

  • Save chrisdone/b69c9a0987b2d0f7da587a650e3f0262 to your computer and use it in GitHub Desktop.

Select an option

Save chrisdone/b69c9a0987b2d0f7da587a650e3f0262 to your computer and use it in GitHub Desktop.
Wrap stack with notify send
#!/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