mirror of
1
0
Fork 0

worked around broken /sys/class/power_supply/<supply_name>/capacity > 100, resolves #460

This commit is contained in:
Gregory Pakosz 2021-03-05 19:02:15 +01:00
parent a752c41bca
commit 4868ac4bd9
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# discharging=$(grep -qi "discharging" "$batpath/status" && echo "true" || echo "false")
# bat_capacity="$batpath/capacity"
# if [ -r "$bat_capacity" ]; then
# charge=$(awk -v charge="$charge" -v capacity="$(cat "$bat_capacity")" 'BEGIN { print charge + capacity / 100 }')
# charge=$(awk -v charge="$charge" -v capacity="$(cat "$bat_capacity")" 'BEGIN { print charge + (capacity > 100 ? 100 : capacity) / 100 }')
# else
# bat_energy_full="$batpath/energy_full"
# bat_energy_now="$batpath/energy_now"