diff options
| author | Benjamin Neff <benjamin@coding4coffee.ch> | 2023-12-01 17:09:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-01 17:09:48 +0100 |
| commit | 0a9d82780e20e24b6fafc5b2aaefedb0957986c9 (patch) | |
| tree | 97b08c7a8566bf06659803085e312079d5b55116 /plugins/bgnotify/bgnotify.plugin.zsh | |
| parent | b6afbbea3a6f41e4016e967da57b33872aff9944 (diff) | |
| download | zsh-0a9d82780e20e24b6fafc5b2aaefedb0957986c9.tar.gz zsh-0a9d82780e20e24b6fafc5b2aaefedb0957986c9.tar.bz2 zsh-0a9d82780e20e24b6fafc5b2aaefedb0957986c9.zip | |
feat(bgnotify): add option to disable terminal bell (#12077)
Diffstat (limited to 'plugins/bgnotify/bgnotify.plugin.zsh')
| -rw-r--r-- | plugins/bgnotify/bgnotify.plugin.zsh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 4499d816c..3c0766191 100644 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -27,7 +27,7 @@ function bgnotify_end { # check if Terminal app is not active [[ $(bgnotify_appid) != "$bgnotify_termid" ]] || return - printf '\a' # beep sound + [[ $bgnotify_bell = true ]] && printf '\a' # beep sound bgnotify_formatted "$exit_status" "$bgnotify_lastcmd" "$elapsed" } always { bgnotify_timestamp=0 @@ -136,6 +136,9 @@ function bgnotify { ## Defaults +# enable terminal bell on notify by default +bgnotify_bell=${bgnotify_bell:-true} + # notify if command took longer than 5s by default bgnotify_threshold=${bgnotify_threshold:-5} |
