Upower provides DisplayDevice that returns the cumulative status across all present batteries. It is relevant on systems with multiple batteries, e.g. some thinkpads.
Basically, you can use self.upowerservice.display_device here instead of binding to the 1st battery. Not sure if smth else can be rewritten to beautify the code, so not a PR. Works fine with just that change, tho.
Cheers!
Upower provides DisplayDevice that returns the cumulative status across all present batteries. It is relevant on systems with multiple batteries, e.g. some thinkpads.
Basically, you can use
self.upowerservice.display_devicehere instead of binding to the 1st battery. Not sure if smth else can be rewritten to beautify the code, so not a PR. Works fine with just that change, tho.Cheers!