home,idle: suspend device after 20min

This commit is contained in:
Guanran Wang 2023-11-08 19:59:42 +08:00
parent 6e84d833eb
commit 55b8095a32
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8

View file

@ -10,12 +10,16 @@
{ {
timeout = 900; timeout = 900;
command = "swaylock"; command = "swaylock";
} } # lock screen
{ {
timeout = 905; timeout = 905;
command = ''${pkgs.sway}/bin/swaymsg "output * dpms off"''; command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\"";
resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * dpms on"''; resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\"";
} # turn off screen } # turn off screen
{
timeout = 1200;
command = ''systemctl suspend'';
} # suspend
]; ];
events = [ events = [
{ {