swayidle: output on/off, suspend
This commit is contained in:
parent
785790bc0b
commit
32a644dd5c
|
@ -199,6 +199,9 @@
|
||||||
services.swayidle =
|
services.swayidle =
|
||||||
let
|
let
|
||||||
lock = "${pkgs.swaylock}/bin/swaylock --daemonize";
|
lock = "${pkgs.swaylock}/bin/swaylock --daemonize";
|
||||||
|
outputOff = "${pkgs.sway}/bin/swaymsg 'output * power off'";
|
||||||
|
outputOn = "${pkgs.sway}/bin/swaymsg 'output * power on'";
|
||||||
|
suspend = "${pkgs.systemd}/bin/systemctl suspend";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -208,6 +211,8 @@
|
||||||
];
|
];
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{ timeout = 600; command = lock; }
|
{ timeout = 600; command = lock; }
|
||||||
|
{ timeout = 900; command = outputOff; resumeCommand = outputOn; }
|
||||||
|
{ timeout = 3600; command = suspend; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue