notes/scripts/batnotify
2022-09-04 21:08:35 -07:00

11 lines
247 B
Bash
Executable file

#!/bin/sh
while true ; do
PWRLVL=$(cat /sys/class/power_supply/BAT1/capacity)
if [ "$PWRLVL" -le 15 ] ; then
notify-send "  Battery is at 15%!!";
sleep 300s;
else
sleep 60s;
fi
done