hypridle: add options for lock, dpms and suspend timeouts
This commit is contained in:
parent
4786f0562b
commit
c3bc08a3f0
|
@ -14,18 +14,18 @@ in
|
|||
}
|
||||
|
||||
listener {
|
||||
timeout = 600
|
||||
timeout = ${toString cfg.hypridle.lockTimeout}
|
||||
on-timeout = "hyprlock"
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 660
|
||||
timeout = ${toString cfg.hypridle.dpmsTimeout}
|
||||
on-timeout = hyprctl dispatch dpms off
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 1800
|
||||
timeout = ${toString cfg.hypridle.suspendTimeout}
|
||||
on-timeout = systemctl suspend
|
||||
}
|
||||
'';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, ... }:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
types = lib.types;
|
||||
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 {
|
||||
type = lib.types.str;
|
||||
default = "0";
|
||||
|
|
Loading…
Reference in a new issue