feat: adjust idle times; nixfmt
This commit is contained in:
parent
b8222703d9
commit
28059709b0
1 changed files with 14 additions and 3 deletions
|
|
@ -1,15 +1,26 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services.swayidle = {
|
services.swayidle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
systemdTarget = "graphical-session.target";
|
systemdTarget = "graphical-session.target";
|
||||||
|
|
||||||
events = [
|
events = [
|
||||||
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
{
|
||||||
|
event = "before-sleep";
|
||||||
|
command = "${pkgs.swaylock}/bin/swaylock -fF";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
timeouts = [
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
command = "${pkgs.swaylock}/bin/swaylock -fF && ${pkgs.niri}/bin/niri msg action power-off-monitors";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1800;
|
||||||
command = "${pkgs.systemd}/bin/systemctl suspend-then-hibernate";
|
command = "${pkgs.systemd}/bin/systemctl suspend-then-hibernate";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue