17 lines
312 B
Bash
Executable File
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
|