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