04-04-2020, 09:25 PM
(04-04-2020, 06:31 PM)belfastraven Wrote:(04-04-2020, 06:10 PM)rossk Wrote: Apologies for the newbie question, but I've been stymied on this so far-- what's a good way to get the PBP battery status (percentage or time remaining, plugged in or on battery, etc) on the command line?
If it matters, I'm on Manjaro 20.04.
On Manjaro, you can use the tlp-stat command: tlp-stat -b gives basic battery info. tlp-stat --help gives further explanations/possibilities.
You can also cat some of the files in the /sys/class/power_supply/cw2015-battery directory.
There are other programs that will give battery statistics if those ideas don't work for you. Just web search on something like
"linux battery statistics from console".
Yeah-- most of the answers I got from general searches like that, weren't giving me useful results (things like the acpi tools, which aren't helpful on the PBP).
but, /sys/class/power_supply/cw2015-battery/ is exactly what I was looking for. Thanks!