1 - Split the program in two parts:
2 - powerd daemon, which will do all the low level power management stuff
3 - wmpower proper, which will be an interface to powerd, this way writing
4 other user interfaces (kde, gnome...) will become much easier as the
5 dirty stuff will be all in one place.
7 - Allow for multiple warning/commands for different configurable battery levels...