You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
@dritter I found a "limitation" related to laptops that have more than 1 battery. It looks like the code looks only at BAT0 or BAT1 to display the capacity. However, I'm using a couple of ThinkPads now that have 2 batteries, and is confusing when one battery runs low and the system switched to the second battery, the prompt still show the details for the first battery.
On my system I managed to overcome the limitation with the following addition:
if [[ -a $sysp/BAT0 ]] && [[ -a $sysp/BAT0 ]]; then
local bat0=$(cat $sysp/BAT0/capacity)
local bat1=$(cat $sysp/BAT1/capacity)
local capacity=$((($bat0 + $bat1)/2))
else
local capacity=$(cat $bat/capacity)
fi
If you feel like this is something worth added in the next release ... feel free to use the code above, or if I can do something, please let me know.
The text was updated successfully, but these errors were encountered:
@dritter I found a "limitation" related to laptops that have more than 1 battery. It looks like the code looks only at BAT0 or BAT1 to display the capacity. However, I'm using a couple of ThinkPads now that have 2 batteries, and is confusing when one battery runs low and the system switched to the second battery, the prompt still show the details for the first battery.
On my system I managed to overcome the limitation with the following addition:
If you feel like this is something worth added in the next release ... feel free to use the code above, or if I can do something, please let me know.
The text was updated successfully, but these errors were encountered: