commit 1ebb4107c040f1e496d3d318c992b1049ee3f746 parent f0739463db66ca30ce48f51130227b615e5682df Author: Antoine Amarilli <a3nm@a3nm.net> Date: Sun, 25 Jan 2026 12:33:44 +0100 battery notifications Diffstat:
| battery_notify | | | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/battery_notify b/battery_notify @@ -0,0 +1,6 @@ +#!/bin/bash + +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" +fi