commit 2a31d924eff66b5f673a2b0fe8782db9e1cac774
parent 1ebb4107c040f1e496d3d318c992b1049ee3f746
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Sun, 25 Jan 2026 12:34:13 +0100
source
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/battery_notify b/battery_notify
@@ -1,5 +1,7 @@
#!/bin/bash
+# source: https://bbs.archlinux.org/viewtopic.php?pid=1080737#p1080737
+
BATTINFO=`acpi -b`
if [[ `echo $BATTINFO | grep Discharging` && `echo $BATTINFO | cut -f 5 -d " "` < 01:00:00 ]] ; then
DISPLAY=:0.0 /usr/bin/notify-send "low battery" "$BATTINFO"