A powertop SystemD service with accompanying udev rules that starts/stops the service when the battery charging status changes.