From 98f45fde8f72ee10fb240a76e487268fb01d37cd Mon Sep 17 00:00:00 2001 From: Mentor Date: Thu, 27 Jan 2022 18:01:18 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20forgot=20the=20recalculation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- battery.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/battery.sh b/battery.sh index 57e9980..4552c91 100644 --- a/battery.sh +++ b/battery.sh @@ -104,6 +104,7 @@ if [[ "$action" == "charge" ]]; then echo "$(date +%T) - Battery at $BATT_PERCENT%" sleep 60 + BATT_PERCENT=`pmset -g batt | tail -n1 | awk '{print $3}' | sed s:\%\;::` done