aboutsummaryrefslogtreecommitdiffstats
path: root/bin/lowbat
diff options
context:
space:
mode:
Diffstat (limited to 'bin/lowbat')
-rwxr-xr-xbin/lowbat8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/lowbat b/bin/lowbat
index 8c274da..55e61fd 100755
--- a/bin/lowbat
+++ b/bin/lowbat
@@ -8,8 +8,8 @@ notify() {
while [ 1 ]; do
acstat=$(acpi | awk '{print $3}' | rev | cut -c 2- | rev)
batlvl=$(acpi | awk '{print $4}' | rev | cut -c 3- | rev)
- while [ "$acstat" = "Discharging" ]; do
- if [ $batlvl -lt 15 ]; then
+ if [ $batlvl -lt 15 ]; then
+ while [ "$acstat" = "Discharging" ]; do
$(notify)
sleep 20
acstat=$(acpi | awk '{print $3}' | rev | cut -c 2- | rev)
@@ -17,7 +17,7 @@ while [ 1 ]; do
if [ "$acstat" = "Charging" ]; then
break
fi
- fi
- done
+ done
+ fi
sleep 240
done