batteryChargeToggle

Open Source
Quick Description
batteryChargeToggle is a small Linux utility that flips your laptop's battery between two charging modes: a longevity mode that stops at 80 percent, and a full charge mode that goes all the way to 100 percent. It works by writing to the battery's charge threshold controls exposed through the Linux sysfs interface.
Keeping a lithium battery pinned at 100 percent all day accelerates wear, so capping it at 80 percent while you're plugged in at a desk meaningfully extends its lifespan, and then you switch to a full charge right before heading out. This tool makes that a single command instead of digging through sysfs paths by hand.