batsignal is a lightweight battery daemon written in C that notifies the user about battery states. It's intended for minimal window managers, but supports any environment depending on libnotify for desktop notifications.
libnotify