From 5355d9663bd66e8e98096b9ee58459a4da6e740d Mon Sep 17 00:00:00 2001 From: Brian Hartvigsen Date: Tue, 10 Jan 2023 00:37:32 -0700 Subject: [PATCH] Move bell to bgnotify_formatted so it can be overwritten if not wanted --- plugins/bgnotify/bgnotify.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 460d739ef..7fbbc978c 100644 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -27,7 +27,6 @@ function bgnotify_end { # check if Terminal app is not active [[ $(bgnotify_appid) != "$bgnotify_termid" ]] || return - printf '\a' # beep sound bgnotify_formatted "$exit_status" "$bgnotify_lastcmd" "$elapsed" } always { bgnotify_timestamp=0 @@ -52,6 +51,7 @@ function bgnotify_formatted { (( $3 < 60 )) || elapsed="$((( $3 % 3600) / 60 ))m $elapsed" (( $3 < 3600 )) || elapsed="$(( $3 / 3600 ))h $elapsed" + printf '\a' # beep sound if [[ $1 -eq 0 ]]; then bgnotify "#win (took $elapsed)" "$2" else