0b0cc2cdea1e3b3e4af78d8d4a9992be468031eb
- Author
- Tim O'Brien <timo@t413.com>
- Committer
- Tim O'Brien <timo@t413.com>
- Date
Message
Fixed math on linux, removed debug echo.
Diff
1diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh
2index f204d9dc84c7cf13fc7dfd65bc98c6620a5ab1a1..b5fb76f7ebc610a601c7092b5a3262893e53be69 100755
3--- a/plugins/bgnotify/bgnotify.plugin.zsh
4+++ b/plugins/bgnotify/bgnotify.plugin.zsh
5@@ -13,7 +13,6 @@ autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return }
6 ## definitions ##
7
8 if ! (type notify_formatted | grep -q 'function'); then
9- echo "using default notify_formatted"
10 function bgnotify_formatted {
11 ## exit_status, command, elapsed_time
12 [ $1 -eq 0 ] && title="#win (took $3 s)" || title="#fail (took $3 s)"
13@@ -50,8 +49,8 @@ bgnotify_begin() {
14
15 bgnotify_end() {
16 didexit=$?
17- elapsed=$(( $EPOCHSECONDS - $bgnotify_timestamp ))
18- past_threshold=$(( $elapsed >= $bgnotify_threshold ))
19+ elapsed=$(( EPOCHSECONDS - bgnotify_timestamp ))
20+ past_threshold=$(( elapsed >= bgnotify_threshold ))
21 if (( bgnotify_timestamp > 0 )) && (( past_threshold )); then
22 if [ $(currentWindowId) != "$bgnotify_windowid" ]; then
23 print -n "\a"