31 lines
694 B
Nix
31 lines
694 B
Nix
|
_: {
|
||
|
services.hypridle = {
|
||
|
enable = true;
|
||
|
|
||
|
settings = {
|
||
|
general = {
|
||
|
lock_cmd = "pidof hyprlock || hyprlock";
|
||
|
unlock_cmd = "pkill --signal SIGUSR1 hyprlock";
|
||
|
before_sleep_cmd = "loginctl lock-session";
|
||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||
|
};
|
||
|
|
||
|
listener = [
|
||
|
{
|
||
|
timeout = 300; # 5m
|
||
|
on-timeout = "loginctl lock-session";
|
||
|
}
|
||
|
{
|
||
|
timeout = 330; # 5.5m
|
||
|
on-timeout = "hyprctl dipsatch dpms off";
|
||
|
on-resume = "hyprctl dispatch dpms on";
|
||
|
}
|
||
|
{
|
||
|
timeout = 600; # 10m
|
||
|
on-timeout = "systemctl suspend";
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
}
|