summaryrefslogtreecommitdiff
path: root/plugins/bgnotify/bgnotify.plugin.zsh
diff options
context:
space:
mode:
authorPukNgae Cryolitia <Cryolitia@gmail.com>2024-09-16 05:20:59 +0800
committerGitHub <noreply@github.com>2024-09-15 23:20:59 +0200
commitac325a7caba6630538c39e1c0ffa192d866cdcff (patch)
treea500e30ede425f79721419c0bcb6b8746fe7e9b3 /plugins/bgnotify/bgnotify.plugin.zsh
parentec7d01faf837f17ccdc91249d0e63117ad0585af (diff)
downloadzsh-ac325a7caba6630538c39e1c0ffa192d866cdcff.tar.gz
zsh-ac325a7caba6630538c39e1c0ffa192d866cdcff.tar.bz2
zsh-ac325a7caba6630538c39e1c0ffa192d866cdcff.zip
feat(bgnotify): add config to pass extra args (#12679)
Diffstat (limited to 'plugins/bgnotify/bgnotify.plugin.zsh')
-rw-r--r--plugins/bgnotify/bgnotify.plugin.zsh10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh
index 7de6f9a91..f6ffb6ed5 100644
--- a/plugins/bgnotify/bgnotify.plugin.zsh
+++ b/plugins/bgnotify/bgnotify.plugin.zsh
@@ -117,15 +117,15 @@ function bgnotify {
local icon="$3"
if (( ${+commands[terminal-notifier]} )); then # macOS
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
- growlnotify -m "$title" "$message"
+ growlnotify -m "$title" "$message" ${=bgnotify_extraargs:-}
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
- kdialog --title "$title" --passivepopup "$message" 5
+ kdialog --title "$title" --passivepopup "$message" 5 ${=bgnotify_extraargs:-}
elif (( ${+commands[notifu]} )); then # cygwin
- notifu /m "$message" /p "$title" ${=icon:+/i "$icon"}
+ notifu /m "$message" /p "$title" ${=icon:+/i "$icon"} ${=bgnotify_extraargs:-}
fi
}