Closed fluffeon closed 4 months ago
I have an implementation of this stat https://github.com/yuki-was-taken/catnap/tree/battery but I'm not sure how handle multiple batteries. This implementation just reads from /sys/class/power_supply/BAT0
, the folder for the default battery. Catnip's way of working limits me from putting a battery configuration option in config.toml
(at least I think so). A way of handling multiple batteries is by reading from an environment variable.
EDIT: I've implemented the environment variable method for now.
2ND EDIT: I've changed it so that Catnap now performs a regex search to detect the default battery.
You are awesome.
I also added that not only one BAT is checked but all existing ones. This will make it easier to add support for multiple batteries later.
Is your feature request related to a problem? Please describe:
This is not really a problem nor is it really obligatory, this is just a suggestion.
Describe the solution you'd like:
Basically, a battery indicator under one of the rows on this fetch that shows battery percentage (Maybe also battery status? Like charging and etc). It should probably also account for other nuances like backup batteries, no batteries present (meaning this row would be hidden) or other batteries on the device.
Additional context:
N/A