Add fixed timeout

This commit is contained in:
Walter Barbagallo 2017-06-11 21:18:30 +02:00
parent 1c958e02a5
commit e628ece7c6

View File

@ -36,7 +36,7 @@ bgnotify () { ## args: (title, subtitle)
[[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] && term_id='com.apple.terminal'; [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] && term_id='com.apple.terminal';
## now call terminal-notifier, (hopefully with $term_id!) ## now call terminal-notifier, (hopefully with $term_id!)
[ -z "$term_id" ] && terminal-notifier -message "$2" -title "$1" >/dev/null || [ -z "$term_id" ] && terminal-notifier -message "$2" -title "$1" >/dev/null ||
terminal-notifier -message "$2" -title "$1" -activate "$term_id" -sender "$term_id" >/dev/null terminal-notifier -message "$2" -title "$1" -activate "$term_id" -sender "$term_id" -timeout 5 >/dev/null
elif hash growlnotify 2>/dev/null; then #osx growl elif hash growlnotify 2>/dev/null; then #osx growl
growlnotify -m "$1" "$2" growlnotify -m "$1" "$2"
elif hash notify-send 2>/dev/null; then #ubuntu gnome! elif hash notify-send 2>/dev/null; then #ubuntu gnome!