Closed erbth closed 1 year ago
I am not sure how this interacts with #304; one would have needed more information on the original problem. If you have any doubts regarding that or anything else in this PR, please request a change.
fyi just rebased to current main
I have a system76 laptop which also lets me set a charging threshold. Mine ends up reporting UNK/Unknown along with 0.00W when it reaches this threshold. The current patch doesn't appear to make things better for me, but it also clearly doesn't make them worse.
@thrasymache thanks for testing! - Yeah, unfortunately the hardware and kernel driver need to report that state as 'Not charging', too. It looks like yours does not - if you like, you could confirm that with cat /sys/class/power_supply/BAT0/status
(if you are on Linux) while the laptop is in the non-charging state.
@erbth The contents of the BAT0/status pseudo-file are Unknown
@thrasymache Then your driver (or hardware) does not support reporting the idle-state correctly. Good to know.
Mine (ThinkPad) shows e.g. "Not charging". Of course that depends on the kernel version, too (e.g. the acpi-driver used by mine got support only recently, currently I'm on Debian's 5.10.149-1).
thanks for merging
Hi everyone,
I would like to add another state to the battery-module called 'idle'. My ThinkPad has a configurable charging regulator that can be instructed to stop charging before the battery is full. Recently a Linux-kernel patch got merged s.t. this state is now correctly reported as "Not charging" by the kernel (before it was "Unknown").
However since #305 this status is mapped to "Discharging". Please have a look at https://github.com/i3/i3status/pull/461#issuecomment-1064700361, where I tried to describe why I think my proposed behavior would be better, and why I think that it would in principle also be better than the proposed change in #461. In my comment I wrote that a mechanism to customize i3status's behavior for "Not charging" might be needed, however I think the mechanism for changing the texts mapped to states through i3status.conf might be enough.
Of course, this PR covers only the foundation and Linux-specific implementation. Support for other OSs would have to be added afterwards if possible, however I cannot assist in that.
Regards, Thomas