Hiberbat is a little tool that puts a laptop into hibernation when the main battery is down to critical levels.
The cool thing is that it is highly configurable from a plain text config file in /etc/. Currently, there's three steps of battery life. For each step, you can set the time that the program sleeps before checking the battery life again. Hiberbat runs as a daemon.
- Log files now include actual battery level.
Hiberbat is licensed under the GPL
int5010 = 240 #The amount of seconds between checks if the battery is higher than 50% int2049 = 120 #The amount of seconds between checks if the battery is between 20% and 50% int20 = 30 #The amount of seconds between checks if the battery is lower than 20% logging = 0 #If 1, logging is activated logfile = /var/log/hiberbat.log #If logging is on, this is the location for the logfile lockas = #username #If this is set, after wakeup, the pc will be locked and you will have to enter the password of the user specified
The next version of hiberbat will bring the ability to define your own steps through the config file.
You can start hiberbat by running /etc/rc.d/hiberbat start as root or adding 'hiberbat' in the DAEMONS array in /etc/rc.conf