Does Plasma provide a way to control battery threshold through the CLI?

I frequently change the charge limit for my laptop battery. Before switching to NixOS, I would use tlp to do it, but now that does not work (at least without some system changes) and so I use Plasma’s power management settings.

I know you can change the battery charge percentage cap from Plasma’s settings GUI, but I wanted to know if you could do the same through a CLI tool the desktop provides.

Plasma doesn’t provide a CLI tool for that.

Ultimately all that happens is writing to a file in /sys/class/power_supply/, so you can do that manually from CLI

2 Likes

Thanks, deeply appreciated

I thought this file would be read-only on NixOS, but it is not, nice.