Skip to content

Instantly share code, notes, and snippets.

@goneri
Created July 11, 2017 18:10
Show Gist options
  • Save goneri/a2b5adb2c0c1efcd25fc75b820959820 to your computer and use it in GitHub Desktop.
Save goneri/a2b5adb2c0c1efcd25fc75b820959820 to your computer and use it in GitHub Desktop.
#!/bin/bash
# I use to work on different tasks and I like to know quickly if something is finished.
# With this script, I can shoot a long command (e.g: an OpenStack deployment) and focus
# on something else.
$*
if [ $? -eq 0 ]; then
status="SUCCESS"
icon=dialog-information
else
status="FAILURE"
icon=dialog-warning
fi
notify-send "$status: $*" --icon=${icon}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment