notes/scripts/batnotify
2022-07-07 13:05:06 -07:00

11 lines
242 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