News for hackers. Stuff that matters.
Re:Love Your Terminal by shurane on Friday November 30, 2012 @03:21PM (#4855245)
There's also `acpi -b`, which I think is available on most linux distros.
Re:Love Your Terminal by jff on Friday November 30, 2012 @04:24PM (#4855538)
It's not necessarily installed by default, though. If your Linux system can read the battery with acpi, it will show up in /sys. Although the 'acpi' program is convenient, it adds another dependency. Also, if you run 'acpi' under strace, you'll see that it just opens up /sys/class/power_supply and parses files under that.