auto-notify.plugin.zsh aktualisiert
This commit is contained in:
parent
e9ca099379
commit
81f5161390
1 changed files with 3 additions and 3 deletions
|
@ -50,17 +50,17 @@ function _auto_notify_message() {
|
|||
title="$(_auto_notify_format "$title" "$command" "$elapsed" "$exit_code")"
|
||||
body="$(_auto_notify_format "$text" "$command" "$elapsed" "$exit_code")"
|
||||
|
||||
local urgency="default"
|
||||
local urgency="3"
|
||||
local icon=${AUTO_NOTIFY_ICON_SUCCESS:-""}
|
||||
# Exit code 130 is returned when a process is terminated with SIGINT.
|
||||
# Since the user is already interacting with the program, there is no
|
||||
# need to make the notification persistent.
|
||||
if [[ "$exit_code" != "0" ]] && [[ "$exit_code" != "130" ]]; then
|
||||
urgency="high"
|
||||
urgency="4"
|
||||
icon=${AUTO_NOTIFY_ICON_FAILURE:-""}
|
||||
fi
|
||||
|
||||
local arguments=("--title='$title'" "--priority='$urgency'" "zsh_events" "$body")
|
||||
local arguments=("--title='$title'" "--priority=$urgency" "zsh_events" "$body")
|
||||
|
||||
ntfy publish ${arguments[@]}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue