update suspend scripts
This commit is contained in:
parent
07aec27826
commit
d1f89a624a
3 changed files with 17 additions and 9 deletions
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
"change-dpi" = ''
|
||||
case "$AUTORANDR_CURRENT_PROFILE" in
|
||||
foureighty-docked)
|
||||
DPI=144
|
||||
;;
|
||||
DPI=144
|
||||
;;
|
||||
foureighty)
|
||||
DPI=144
|
||||
;;
|
||||
DPI=144
|
||||
;;
|
||||
*)
|
||||
echo "Unknown profle: $AUTORANDR_CURRENT_PROFILE"
|
||||
exit 1
|
||||
echo "Unknown profle: $AUTORANDR_CURRENT_PROFILE"
|
||||
exit 1
|
||||
esac
|
||||
echo "changing DPI to $DPI"
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --dpi $DPI
|
||||
|
|
|
@ -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
|
||||
''}";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue