added battery notification script

This commit is contained in:
z3rOR0ne 2022-06-17 03:22:52 -07:00
parent af2cc27c30
commit 4a2efd1ecc

11
scripts/batnotify Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
while [ true ] ; do
PWRLVL=$(cat /sys/class/power_supply/BAT1/capacity)
if [ $PWRLVL -eq 15 ] ; then
exec notify-send "Battery is at 15%!!";
break;
else
sleep 15s;
fi
done