Files
dotfiles/bin/batpercd
T
2024-07-15 08:09:22 +07:00

17 lines
312 B
Bash
Executable File

#!/bin/sh
batperc=$(~/dotfiles/bin/batperc -j)
echo $batperc
if [[ "$batperc" != "no" ]]; then
while true; do
for i in $batperc; do
if [[ "$i" -le "20" ]]; then
notify-send "Battery low: $i%" -u critical
sleep 60
fi
done
done
fi