battwatch.sh: added
This commit is contained in:
parent
c6227f097c
commit
3153ca6041
12
src/.local/bin/deskutils/battwatch.sh
Executable file
12
src/.local/bin/deskutils/battwatch.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# i didn't *really* feel like having a cronjob for this so
|
||||
|
||||
while true; do
|
||||
BAT="$(acpi -b | head -n 1 | awk -F'[,:]' '{print $3}' | tr -d '[:space:]%')"
|
||||
if [ "$BAT" -lt "10" ]; then
|
||||
notify-send -u critical -a battery "currently at $BAT%"
|
||||
elif [ "$BAT" -lt "20" ]; then
|
||||
notify-send -a battery "currently at $BAT%"
|
||||
fi
|
||||
sleep 240
|
||||
done
|
Loading…
Reference in New Issue
Block a user