diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2008-03-31 08:44:34 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-03-31 08:44:34 +0000 |
| commit | cd002b398d9ebdbfe7590508766014e5ea4d5e2c (patch) | |
| tree | 7b1a0a229bcbe538169abe30b312e39c4087104a /Functions/Calendar/calendar_show | |
| parent | 24708: Misc/globtests, Src/pattern.c, Test/D02glob.ztst: (diff) | |
| download | zsh-cd002b398d9ebdbfe7590508766014e5ea4d5e2c.tar zsh-cd002b398d9ebdbfe7590508766014e5ea4d5e2c.tar.gz zsh-cd002b398d9ebdbfe7590508766014e5ea4d5e2c.tar.bz2 zsh-cd002b398d9ebdbfe7590508766014e5ea4d5e2c.tar.lz zsh-cd002b398d9ebdbfe7590508766014e5ea4d5e2c.tar.xz zsh-cd002b398d9ebdbfe7590508766014e5ea4d5e2c.tar.zst zsh-cd002b398d9ebdbfe7590508766014e5ea4d5e2c.zip | |
unposted: use kdialog in calendar_show if appropriate
Diffstat (limited to 'Functions/Calendar/calendar_show')
| -rw-r--r-- | Functions/Calendar/calendar_show | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Functions/Calendar/calendar_show b/Functions/Calendar/calendar_show index 13fc6a491..5be589945 100644 --- a/Functions/Calendar/calendar_show +++ b/Functions/Calendar/calendar_show @@ -9,11 +9,21 @@ zmodload -i zsh/parameter || return # Use xmessage to display the message if the start and stop time # are the same, indicating we have been scheduled to display it. -# Don't do this if there's already an xmessage for the same user. +# Don't do this if there's already an notification/message for the same user. # HERE: this should be configurable and we should be able to do # better if xmessage isn't available, e.g. wish. if [[ -n $DISPLAY && $start -eq $stop ]]; then - if [[ -n ${commands[xmessage]} ]]; then + if [[ -n ${commands[kdialog]} && -n $KDE_SESSION_UID ]] && dcop >&/dev/null + then + # We're in a KDE session, most probably. + # Simple: + cmd=(kdialog --msgbox) + # Alternative: + # calendar_knotify_show() { + # dcop knotify default notify calendar zsh "$*" '' '' 2 0 + # } + # cmd=(calendar_knotify_show) + elif [[ -n ${commands[xmessage]} ]]; then cmd=(xmessage -center) fi if [[ -n $cmd[1] ]] && |
