created simple battery notification script for laptop
This commit is contained in:
parent
ae93e5b24b
commit
af2cc27c30
1 changed files with 11 additions and 0 deletions
11
runit_scripts/batnotify/run
Executable file
11
runit_scripts/batnotify/run
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue