Before I begin, I want to thank the maintainers of this crate, as it helped a lot in my Screen Brightness daemon, where I needed battery info.
On Linux laptops, software like TLP (https://linrunner.de/tlp/) can configure the battery to stop charging at a certain threshold while plugged in. I used TLP on my ArchLinux laptop and noticed that battery.state() will return "unknown" as a state when the battery is on AC power but was not charging.
I looked at my battery's status file and found that when the battery is on AC power but not charging, the status file will read "Not Charging."
I can work on a PR that adds support for the "Not charging" state. I would need to add a new value to the State enum and add formatting for the new state.
Before I begin, I want to thank the maintainers of this crate, as it helped a lot in my Screen Brightness daemon, where I needed battery info.
On Linux laptops, software like TLP (https://linrunner.de/tlp/) can configure the battery to stop charging at a certain threshold while plugged in. I used TLP on my ArchLinux laptop and noticed that battery.state() will return "unknown" as a state when the battery is on AC power but was not charging.
I looked at my battery's status file and found that when the battery is on AC power but not charging, the status file will read "Not Charging."
I can work on a PR that adds support for the "Not charging" state. I would need to add a new value to the State enum and add formatting for the new state.