diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-11-14 09:55:31 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-11-14 09:55:31 +0100 |
commit | 4a5e258cbbeb107f8b3d460d434ec3239fef5b1b (patch) | |
tree | b33d2245d69a1f800e86cba0bb1d51233e1be9b9 | |
parent | Typo corrected (diff) | |
download | lowbat-gnu-4a5e258cbbeb107f8b3d460d434ec3239fef5b1b.tar.gz lowbat-gnu-4a5e258cbbeb107f8b3d460d434ec3239fef5b1b.tar.bz2 lowbat-gnu-4a5e258cbbeb107f8b3d460d434ec3239fef5b1b.tar.xz lowbat-gnu-4a5e258cbbeb107f8b3d460d434ec3239fef5b1b.tar.zst lowbat-gnu-4a5e258cbbeb107f8b3d460d434ec3239fef5b1b.zip |
HUGE performance bug fixed
-rwxr-xr-x | bin/lowbat | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |