hypridle: add options for lock, dpms and suspend timeouts
This commit is contained in:
parent
4786f0562b
commit
c3bc08a3f0
|
@ -14,18 +14,18 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 600
|
timeout = ${toString cfg.hypridle.lockTimeout}
|
||||||
on-timeout = "hyprlock"
|
on-timeout = "hyprlock"
|
||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 660
|
timeout = ${toString cfg.hypridle.dpmsTimeout}
|
||||||
on-timeout = hyprctl dispatch dpms off
|
on-timeout = hyprctl dispatch dpms off
|
||||||
on-resume = hyprctl dispatch dpms on
|
on-resume = hyprctl dispatch dpms on
|
||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 1800
|
timeout = ${toString cfg.hypridle.suspendTimeout}
|
||||||
on-timeout = systemctl suspend
|
on-timeout = systemctl suspend
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
types = lib.types;
|
types = lib.types;
|
||||||
in
|
in
|
||||||
|
@ -49,6 +49,24 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hypridle = {
|
||||||
|
lockTimeout = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 600;
|
||||||
|
description = ''Time in seconds before the screen locks'';
|
||||||
|
};
|
||||||
|
dpmsTimeout = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = config.profile.hyprland.hypridle.lockTimeout + 60;
|
||||||
|
description = ''Time in seconds before the screen turns off. default is lockTimeout + 60'';
|
||||||
|
};
|
||||||
|
suspendTimeout = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 1800;
|
||||||
|
description = ''Time in seconds before the system suspends. default is 30 minutes (1800 seconds)'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
dunst.monitor = lib.mkOption {
|
dunst.monitor = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "0";
|
default = "0";
|
||||||
|
|
Loading…
Reference in a new issue