ansible-desktop/roles/laptop/files/lib/systemd/system/battery-charge-threshold.service
2023-04-24 04:04:17 +02:00

12 lines
267 B
Desktop File

[Unit]
Description=Set the battery charge threshold
After=multi-user.target
StartLimitBurst=0
[Service]
Type=oneshot
Restart=on-failure
ExecStart=/bin/bash -c 'echo 60 > /sys/class/power_supply/BAT0/charge_control_end_threshold'
[Install]
WantedBy=multi-user.target