It depends on the desktop in question(Namely what WM you are using most of the time) how the best way to go about it is. GKrellim is probably one thing that is capable across multiple WMs I believe that might do what you want. e17 has its own modules to do this, as does Gnome and KDE I believe, though it has been a while since I used those.
It is impotant to note that if your ACPI implementation is not fully supported under linux you may not have access to those functions, you can check using acpitool if you ahve it availiable and see what it can and cannot report back. Or just cat the various files in your /proc/acpi and see what info you can find in there if you don't have acpitool