mirror of
https://github.com/actuallymentor/battery.git
synced 2026-06-11 03:30:29 +01:00
Merge pull request #12 from weiyou/fix-plus-one-issue
change '-gt' to '-ge' so the maintained battery level does not have a…
This commit is contained in:
@@ -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
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user