worked around broken /sys/class/power_supply/<supply_name>/capacity > 100, resolves #460
This commit is contained in:
parent
a752c41bca
commit
4868ac4bd9
1 changed files with 1 additions and 1 deletions
|
@ -303,7 +303,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
||||||
# discharging=$(grep -qi "discharging" "$batpath/status" && echo "true" || echo "false")
|
# discharging=$(grep -qi "discharging" "$batpath/status" && echo "true" || echo "false")
|
||||||
# bat_capacity="$batpath/capacity"
|
# bat_capacity="$batpath/capacity"
|
||||||
# if [ -r "$bat_capacity" ]; then
|
# 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
|
# else
|
||||||
# bat_energy_full="$batpath/energy_full"
|
# bat_energy_full="$batpath/energy_full"
|
||||||
# bat_energy_now="$batpath/energy_now"
|
# bat_energy_now="$batpath/energy_now"
|
||||||
|
|
Loading…
Reference in a new issue