News for hackers. Stuff that matters.
Re:Love Your Terminal by MrGando on Friday November 30, 2012 @08:01AM (#4853018)
I wrote a little script to display the battery status (in a nice format) that should work on Bash & ZSH. I use it on my Tmux bar too...

Check it out :)

https://github.com/Goles/Battery

Re:Love Your Terminal by theskumar on Friday November 30, 2012 @08:32AM (#4853109)
Would have loved it, if worked on linux too.
Re:Love Your Terminal by MrGando on Friday November 30, 2012 @10:54AM (#4853717)
You can always pull request on it.

Linux support is on the roadmap, I would need some beta-testers though

Re:Love Your Terminal by jff on Friday November 30, 2012 @01:05PM (#4854470)
You can check Linux battery status by just reading from a certain file somewhere under /proc; being Linux, I'm certain there's an equivalent buried somewhere in /sys as well. You just read the file, it gives you back ASCII text, you're all set.
Re:Love Your Terminal by MrGando on Friday November 30, 2012 @01:19PM (#4854556)
Will add Linux support asap :)
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.