mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
feat(bgnotify): add bgnotify_extraargs to pass user defined args to notifier
This commit is contained in:
parent
e3e80b98b5
commit
7bf3b2fb07
1 changed files with 5 additions and 5 deletions
|
|
@ -117,15 +117,15 @@ function bgnotify {
|
||||||
local icon="$3"
|
local icon="$3"
|
||||||
if (( ${+commands[terminal-notifier]} )); then # macOS
|
if (( ${+commands[terminal-notifier]} )); then # macOS
|
||||||
local term_id=$(bgnotify_programid)
|
local term_id=$(bgnotify_programid)
|
||||||
terminal-notifier -message "$message" -title "$title" ${=icon:+-appIcon "$icon"} ${=term_id:+-activate "$term_id"} &>/dev/null
|
terminal-notifier -message "$message" -title "$title" ${=icon:+-appIcon "$icon"} ${=term_id:+-activate "$term_id"} ${=bgnotify_extraargs:-} &>/dev/null
|
||||||
elif (( ${+commands[growlnotify]} )); then # macOS growl
|
elif (( ${+commands[growlnotify]} )); then # macOS growl
|
||||||
growlnotify -m "$title" "$message"
|
growlnotify -m "$title" "$message" ${=bgnotify_extraargs:-}
|
||||||
elif (( ${+commands[notify-send]} )); then
|
elif (( ${+commands[notify-send]} )); then
|
||||||
notify-send "$title" "$message" ${=icon:+--icon "$icon"}
|
notify-send "$title" "$message" ${=icon:+--icon "$icon"} ${=bgnotify_extraargs:-}
|
||||||
elif (( ${+commands[kdialog]} )); then # KDE
|
elif (( ${+commands[kdialog]} )); then # KDE
|
||||||
kdialog --title "$title" --passivepopup "$message" 5
|
kdialog --title "$title" --passivepopup "$message" 5 ${=bgnotify_extraargs:-}
|
||||||
elif (( ${+commands[notifu]} )); then # cygwin
|
elif (( ${+commands[notifu]} )); then # cygwin
|
||||||
notifu /m "$message" /p "$title" ${=icon:+/i "$icon"}
|
notifu /m "$message" /p "$title" ${=icon:+/i "$icon"} ${=bgnotify_extraargs:-}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue