-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does Macchina support two batteries? #295
Comments
Hi. It can't. I don't really know how to tackle this problem, either. I also don't have the hardware to try and write an implementation. It would be very appreciated if you or others alike could give us a hand with this problem. |
Even if multiple batteries are present, shouldn't macchina just report the status of the first one? @mohabmetwalli: Can you show the directory listing of |
Yes, indeed. I'll see what I can do to fix this. Adding support for this could prove to be a lot of work in |
Hi, Regarding batteries, this library might be helpful, https://crates.io/crates/starship-battery It has one API which lists batteries and their info and works with most major operating systems (including NetBSD thanks to my port) except OpenBSD for now. If I make this proposal despite macchina having already some battery reading features is because, this library basically provide an iterator with all available batteries + update methods, and this would ease the process of reading multiple batteries on any operating system with a single implementation on macchina's side. The example directory in that library shows how to use the library, iterate over batteries and so on. |
When we fetch things, we like to call libmacchina, that's the only backend we wish to use. So it would be best if we wrote our own implementation, we're already borrowing quite a few things from other libraries in libmacchina and I don't like that we do that. |
It was just a proposal to make things simpler and use the systems' APIs instead of running shell commands. (At least in the netbsd's case). To be fair it would not make sense to make a rewrite at it would mostly be about making a clone. And of course it would be used in libmacchina, I though this repo and issue feed was for the project overall. |
I wasn't sure if I should open this issue as a bug or a feature request, so I thought I should ask this question first.
My laptop has two batteries, and I suspect this is the reason
macchina
cannot read battery percentage.macchina --doctor
output:ls /sys/class/power_supply --all
output:The text was updated successfully, but these errors were encountered: