diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/plugins.org | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/plugins.org b/doc/plugins.org index 4facc85..442af34 100644 --- a/doc/plugins.org +++ b/doc/plugins.org @@ -306,7 +306,7 @@ "--", "-O", "<fc=green>On</fc> - ", "-i", "", "-L", "-15", "-H", "-5", "-l", "red", "-m", "blue", "-h", "green", - "-a", "notify-send -u critical 'Battery running out!!'", + "-a", "notify-once \"xmobar\" -u critical 'Battery running out!!'", "-A", "3"] 600 #+end_src @@ -316,7 +316,19 @@ separator affect how =<watts>= is displayed. For this monitor, neither the generic nor the specific options have any effect on =<timeleft>=. We are also telling the monitor to execute the unix command - =notify-send= when the percentage left in the battery reaches 6%. + =notify-once= when the percentage left in the battery reaches 6%. + + =notify-once= is a bash wrapper script provided with the =xmobar= package. + =xmobar= will run the notification command according to the refresh period, + this has the effect of spamming the notification tray if calling =notify-send= directly. + =notify-once= script deduplicates the notification by indicating to =notify-send= + the last notification we want to replace. + See [[https://codeberg.org/xmobar/xmobar/issues/746][#746]] for more information. + Note that your notification daemon should handle notification replacement + for this to work. Whether the replacement resets the timeout is also handled by the + notification daemon. + For example, the =wired-notify= implementation has =replacing_enabled= + and =replacing_resets_timeout= configuration options [[https://github.com/Toqozz/wired-notify/wiki/Config]]. It is also possible to specify template variables in the =-O= and =-o= switches, as in the following example: |
