ai / autohide-battery

GNOME Shell extension to hide battery icon in top panel, if battery is fully charged and AC is connected.

Home Page:https://extensions.gnome.org/extension/595/autohide-battery/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to hide battery on 'unknown' power state

piousdeer opened this issue · comments

On my Lenovo Legion laptop, and probably on other Lenovo laptops, when battery conservation mode is enabled and the battery level reaches the threshold (which can be 58 to 60 %), /sys/class/power_supply/BAT0/status reports Unknown. It'd be great if this extension supported this to avoid having to manually change the maximum charging level from 100% to 58% and vice versa whenever the conservation mode is toggled.

Can you send PR since I do not have this hardware for tests

Apparently proxy.State reports charging even when the BAT0/status is unknown, so I'm not sure where to go with this. When battery level reaches 60%, proxy.TimeToFull is set to 0, but charging can be stopped before that, at 58 or 59 %. This probably needs to be adressed in UPower.