Make notifications transient if successful
This commit is contained in:
parent
1f64cb6544
commit
8418a6e3b2
1 changed files with 3 additions and 1 deletions
|
@ -51,10 +51,12 @@ function _auto_notify_message() {
|
||||||
|
|
||||||
if [[ "$platform" == "Linux" ]]; then
|
if [[ "$platform" == "Linux" ]]; then
|
||||||
local urgency="normal"
|
local urgency="normal"
|
||||||
|
local transient=--transient
|
||||||
if [[ "$exit_code" != "0" ]]; then
|
if [[ "$exit_code" != "0" ]]; then
|
||||||
urgency="critical"
|
urgency="critical"
|
||||||
|
transient=""
|
||||||
fi
|
fi
|
||||||
notify-send "$title" "$body" --app-name=zsh "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME"
|
notify-send "$title" "$body" --app-name=zsh $transient "--urgency=$urgency" "--expire-time=$AUTO_NOTIFY_EXPIRE_TIME"
|
||||||
elif [[ "$platform" == "Darwin" ]]; then
|
elif [[ "$platform" == "Darwin" ]]; then
|
||||||
osascript \
|
osascript \
|
||||||
-e 'on run argv' \
|
-e 'on run argv' \
|
||||||
|
|
Loading…
Add table
Reference in a new issue