gopsutil
gopsutil copied to clipboard
Feature request: Get battery state
Is your feature request related to a problem? Please describe. I have in the past used https://github.com/distatus/battery to get battery status on laptops but that is only for getting battery information. To add that feature here would mean fewer dependencies.
Describe the solution you'd like Similar features as distatus/battery but in line with the formatting of gopsutil
Describe alternatives you've considered Only thing I have found is distatus/battery
Sure it would be a logical step compared to what OS statistics gopsutil is already able to return, but I think we already have a large API and few contributors to support it so adding this one (while this other package is well maintained) might not be so wise…
Makes sense, I was just checking out Gotop and saw that it uses distatus/battery, so that package is very well known. Would it be possible to way forward to just add that package to gopsutil for this feature? just mainly to unify the api access
Implementing new battery-related functions (in host package probably, like the SensorsTemperatures functions), while offloading implementation to distatus/battery, is doable indeed.
As @Lomanic said, we have a few contributors and actually, I am very tough schedule in these months. (I always thank @Lomanic )
But, if you make a PR which implement battery in host package, we can merge it. A contribution is always welcome!