Estel - and the rest: This should be part of the "Settings", as an application that you were to run every time you changed battery - and maybe even included the possibility of storing the capacity of more than one battery, allowing you to change. (...) Now someone of us should make a GUI for "learning battery characteristics", save these and set the charge HW correctly.
Your use of names cause amusement: check computer science what "bnf" means (is an abbreviation for, hint: compiler theory..).
I can do some coding (C/C++, Perl, Shell), but need help with the GUI. Who is willing to help?