vivien / i3blocks-contrib

Official repository for community contributed blocklets
https://github.com/vivien/i3blocks
Other
1.31k stars 487 forks source link

Battery-poly not understanding the "Not charging" status #522

Open kuon opened 6 months ago

kuon commented 6 months ago

The battery-poly blocklet is crashing on my system (HP laptop) when there is power, but not enough to charge the system.

The status reported by the kernerl is Not charging.

I think it should be handled here:

https://github.com/vivien/i3blocks-contrib/blob/9d66d81da8d521941a349da26457f4965fd6fcbd/battery-poly/battery-poly#L101

With or raw_status == "Not charging" added.

I can create a PR but this seem minor enough.

MouadLahlal commented 3 months ago

Also battery2 blocklet has this problem. And I solved it in the same way, just by adding or state == 'Not charging'