showing battery state on plug/unplug

(I hope? code compiles but no cable to test...)

close #10