This file contains 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
# end and compare timer, notify-send if needed | |
function notifyosd-precmd() { | |
if [ ! -z "$cmd" ]; then | |
cmd_end=`date +%s` | |
((cmd_time=$cmd_end - $cmd_start)) | |
fi | |
if [ ! -z "$cmd" -a $cmd_time -gt 10 ]; then | |
notify-send -i utilities-terminal -u low "$cmd_basename completed" "\"$cmd\" took $cmd_time seconds" | |
unset cmd | |
fi |