Created
March 13, 2023 16:37
-
-
Save JamesAtIntegratnIO/469c7e421e983ac26befca0fe5349026 to your computer and use it in GitHub Desktop.
udev rules for power profile switching for laptops
This file contains hidden or 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
services.udev.extraRules = '' | |
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0",RUN+="${pkgs.power-profiles-daemon}/bin/powerprofilesctl set power-saver" | |
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="1",RUN+="${pkgs.power-profiles-daemon}/bin/powerprofilesctl set performance" | |
''; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment