update suspend scripts

This commit is contained in:
Cyryl Płotnicki 2021-11-12 22:36:04 +00:00
parent 07aec27826
commit d1f89a624a
3 changed files with 17 additions and 9 deletions

View file

@ -83,6 +83,11 @@
extraBackends = with pkgs; [ samsung-unified-linux-driver ];
};
powerManagement.enable = (lib.mkForce true);
powerManagement.powertop.enable = true;
powerManagement = {
enable = (lib.mkForce true);
resumeCommands = ''
${pkgs.autorandr}/bin/autorandr -c
'';
powertop.enable = true;
};
}

View file

@ -15,7 +15,10 @@
}
{
delay = 600;
command = "xrandr --output \"$PRIMARY_DISPLAY\" --brightness 1; systemctl suspend";
command = "${pkgs.writeShellScript "my-script" ''
xrandr --output "$PRIMARY_DISPLAY" --brightness 1
systemctl suspend
''}";
}
];