Battery-Status is a project mainly written in C, it's free.
Trivial program showing the state of the battery on the command line (linux)
battery
ABOUT:
Command line tool showing battery status on laptops using linux and possibly other unix flavors.
REQUIREMENTS:
kernel with sysfs and acpi support (most linux kernels will do)
COMPILATION:
mkdir build cd build cmake .. make
(optional) make install (as root)