Of course, you can change the limit to something like 20-80. Although, I am not a fan of the lower 20% limit and I prefer 40-80% instead.Once the extension is enabled, you can find it in the system tray. On the first run, it shows red exclamation mark because it is not enabled yet.
As you can see in the official Lenovo video above, continuous full charging and discharging accelerate the deterioration of battery health. They also tell you that the optimum battery charging range is 20-80%.

I am not making claims on my own. This is what the experts and even the computer manufactures tell you. Use the Extension Manager tool to install ThinkPad Battery Threshold extension. 💡If you click on the Threshold settings, you will be presented with configuration options.
- KDE Plasma has this as an in-built feature. That’s why KDE is ❤️
- GNOME has extensions for this. Typical GNOME thing.
- There are command line tools to limit battery charging levels. Typical Linux thing 😍
From what I see, the command it runs should work for most, if not all, laptops from different manufacturers.
Limit laptop battery charging in KDE
Here’s the thing. For most laptops, there should be file(s) to control battery charging in /sys/class/power_supply/BAT0/
directory but the file names are not standard. It could be charge_control_end_threshold
or charge_stop_threshold
or something similar.Install the upower
CLI tool on your distribution and then use this command:

Also, you may have more than one battery. For most laptops, it will be BAT0 that is the main battery but you need to make sure of that.

Like most other things, GNOME users can achieve this by using a GNOME extension.
/etc/tlp.conf
file.Conclusion
Now, you could manually plug and unplug the power cord but it won’t work if you are connected to a docking station or use a modern monitor to power your laptop. 💡At this screen, you can have a partial hint about the command it is going to run it.