summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorLéana 江 <leana.jiang+git@icloud.com>2026-06-22 21:54:18 +0200
committerjao <mail@jao.io>2026-06-23 21:41:59 +0200
commitd0f19fe55e1dc7fa62740d29e6b1396d30573b8d (patch)
tree783f3e26a6ef905052179f5ade1391c48f46ea7a /doc
parent437523ebc951438bc5f0641005f9cfbb6f820e3e (diff)
downloadxmobar-d0f19fe55e1dc7fa62740d29e6b1396d30573b8d.tar.gz
xmobar-d0f19fe55e1dc7fa62740d29e6b1396d30573b8d.tar.bz2
document XMOBAR_BATT_LEFT variable
Diffstat (limited to 'doc')
-rw-r--r--doc/plugins.org7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/plugins.org b/doc/plugins.org
index 4d14771..ecc9507 100644
--- a/doc/plugins.org
+++ b/doc/plugins.org
@@ -306,8 +306,8 @@
"--", "-O", "<fc=green>On</fc> - ", "-i", "",
"-L", "-15", "-H", "-5",
"-l", "red", "-m", "blue", "-h", "green",
- "-a", "notify-once \"xmobar\" -u critical 'Battery running out!!'",
- "-A", "3"]
+ "-a", "notify-once \"xmobar\" -u critical 'Battery running out!!' \"$XMOBAR_BATT_LEFT% Remains\"",
+ "-A", "6"]
600
#+end_src
@@ -318,6 +318,9 @@
We are also telling the monitor to execute the unix command
=notify-once= when the percentage left in the battery reaches 6%.
+ =XMOBAR_BATT_LEFT= environment variable is made available to the program being called.
+ You can use it to make the alert message more informative. It is an integer between 0 and 100.
+
=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.