Files
illogical-impulse/modules/desktop/hyprland/hypridle.nix
T
2025-08-19 18:35:27 -05:00

38 lines
803 B
Nix

{
config,
pkgs,
...
}: {
programs.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch global quickshell:lockFocus";
inhibit_sleep = 3;
};
listener = [
{
timeout = 300;
on-timeout = "loginctl lock-session";
}
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 900;
on-timeout = "systemctl suspend || loginctl suspend";
}
];
};
};
# Make sure the hypridle package is installed
home.packages = [
pkgs.hypridle
];
}