It's been shown that small but regular top ups to a lithium ion battery (as well as not letting it get too close to either extreme of 0% or 100%) help preserve its lifespan. Currently only supports OSX.
This program will periodically check your battery state and notify you if you need to plug/unplug.
To run:
runhaskell Main.hs