From a1062daf0d713d4c0de463db943952ed4084e62a Mon Sep 17 00:00:00 2001 From: weiyou Date: Mon, 10 Oct 2022 16:29:36 -0700 Subject: [PATCH] change '-gt' to '-ge' so the maintained battery level does not have an extra one point. --- battery.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/battery.sh b/battery.sh index 6c3a2f1..6a317dc 100644 --- a/battery.sh +++ b/battery.sh @@ -242,7 +242,7 @@ if [[ "$action" == "maintain_synchronous" ]]; then # Keep track of status is_charging=$( get_smc_charging_status ) - if [[ "$battery_percentage" -gt "$setting" && "$is_charging" == "enabled" ]]; then + if [[ "$battery_percentage" -ge "$setting" && "$is_charging" == "enabled" ]]; then log "Charge above $setting" disable_charging @@ -364,4 +364,4 @@ if [[ "$action" == "remove_daemon" ]];then rm $daemon_path 2> /dev/null exit 0 -fi \ No newline at end of file +fi