Created
August 8, 2024 01:41
-
-
Save realyukii/dd136ffe258dd1765718cb8da9812b6a to your computer and use it in GitHub Desktop.
[systemd service] add a battery's threshold on supported laptop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put the file on /etc/systemd/system | |
[Unit] | |
Description=Set Battery Threshold | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/bash -c 'echo 80 > /sys/class/power_supply/BAT1/charge_control_end_threshold' | |
RemainAfterExit=true | |
[Install] | |
WantedBy=multi-user.target hibernate.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment