fix: use proper settings attrset for hypridle

This commit is contained in:
Bernardo Magri
2026-04-06 21:52:07 +01:00
parent eebec40ea0
commit a6ec85d1ef

View File

@@ -3,35 +3,34 @@
{
services.hypridle = {
enable = config.nomarchy.toggles.idle;
extraConfig = ''
general {
lock_cmd = nomarchy-lock-screen # lock screen and 1password
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = sleep 1 && hyprctl dispatch dpms on # delay for PAM readiness, then turn on display.
inhibit_sleep = 3 # wait until screen is locked
}
settings = {
general = {
lock_cmd = "nomarchy-lock-screen";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "sleep 1 && hyprctl dispatch dpms on";
inhibit_sleep = 3;
};
listener {
timeout = 150 # 2.5min
on-timeout = pidof hyprlock || nomarchy-launch-screensaver # start screensaver (if we haven't locked already)
}
listener {
timeout = 151 # 5min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {
timeout = 330 # 5.5min
on-timeout = brightnessctl -sd '*::kbd_backlight' set 0 # save state and turn off keyboard backlight
on-resume = brightnessctl -rd '*::kbd_backlight' # restore keyboard backlight
}
listener {
timeout = 330 # 5.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
}
'';
listener = [
{
timeout = 150;
on-timeout = "pidof hyprlock || nomarchy-launch-screensaver";
}
{
timeout = 151;
on-timeout = "loginctl lock-session";
}
{
timeout = 330;
on-timeout = "brightnessctl -sd '*::kbd_backlight' set 0";
on-resume = "brightnessctl -rd '*::kbd_backlight'";
}
{
timeout = 330;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on && brightnessctl -r";
}
];
};
};
}