battery is a shell script to get the remaning battery lifetime before the shutdown of laptop. Often i forgot to load my laptop so, it reboot ... I write it to have an indicator on my screen(1). For example, to use it, you can add this follow lines to your ~$HOME/.screenrc configuration file :
backtick 9 0 10 /path/to/battery.sh hardstatus string "battery: %9` host: %H - %D %d %M %Y %c:%s (load: %l) %-26=%1 %W"And to have an idea of the result :