Battery charge limiter
BSD-3-CLAUSE License
Set a charge limit to try to prolong the battery life of laptops without hardware charge limit. For example, recent Macbooks.
In short, it works by leaving the battery unaffected as much time as possible. Specifically:
This might not work well for everybody, but it works well for me:
Does this save battery life? I hope so, and with what I know about lithium batteries I'm pretty sure it does. But I have no proof of this. If you're interested in learning more, I recommend reading this page from AccuBattery that goes into a lot more depth. The tl;dr is that what is most harmful to batteries is charging beyond 80% or so.
As root:
make install
systemctl start basmati
systemctl enable basmati
To check it's running:
systemctl status basmati
BSD 3 clause.