Skip to content

Instantly share code, notes, and snippets.

@andrewplummer
Created November 27, 2012 04:56
Show Gist options
  • Save andrewplummer/4152468 to your computer and use it in GitHub Desktop.
Save andrewplummer/4152468 to your computer and use it in GitHub Desktop.
Notify anything Ubuntu
#!/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