PS: Actually it is /proc/acpi/battery/BAT0 unless you are checking a second battery
If you are installing KDE i recommend klaptop.
Klaptop is very useful taskbar applet, as it can adjust the CPU throttle (intel speedstep etc), and it does warn you when your battery will run out, when it's fully charged, etc.
I don't use gnome but i think it is called gLaptop or gnome-battery. (simliar to klaptop)
If you are using other window managers (window maker, icewm...) then i am not sure. Maybe catting data to the /proc ?