mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
feat(bgnotify): add option to disable terminal bell (#12077)
This commit is contained in:
parent
b6afbbea3a
commit
0a9d82780e
2 changed files with 6 additions and 1 deletions
|
|
@ -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}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue