Files
cnix/home/core/services/hypr/idle/default.nix
2024-07-15 19:40:02 +02:00

28 lines
607 B
Nix

{
services.hypridle = {
enable = true;
importantPrefixes = [
"$lock_cmd = pidof hyprlock || hyprlock"
"$suspend_cmd = pidof steam || systemctl suspend || loginctl suspend"
];
settings = {
general = {
lock_cmd = "$lock_cmd";
before_sleep_cmd = "$lock_cmd";
};
listener = [
{
timeout = 900; # 15mins
on-timeout = "$lock_cmd";
}
{
timeout = 1200; # 20mins
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
}