Created
November 27, 2012 04:56
-
-
Save andrewplummer/4152468 to your computer and use it in GitHub Desktop.
Notify anything Ubuntu
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/sh | |
T="$(date +%s)" | |
"$@" | |
T="$(($(date +%s)-T))" | |
#TIME=$(printf "Pretty format: %02d:%02d:%02d:%02d\n" "$((T/86400))" "$((T/3600%24))" "$((T/60%60))" "$((T%60))") | |
TIME=$(printf "%02dh%02dm%02ds\n" "$((T/3600%24))" "$((T/60%60))" "$((T%60))") | |
notify-send "Process Finished" "\"$1\" completed in $TIME." -i $HOME/Dropbox/Icons/emblem-important.svg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment