nix-flake/modules/home/rice/idle.nix
satr14 c39e13eebd
All checks were successful
Activate Homelab Configuration / rebuild (push) Successful in 24s
extra keybinds, disable fusuma, hypridle for niri, looks tweaks
2026-07-09 16:27:07 +07:00

38 lines
No EOL
929 B
Nix

{ pkgs, ... }: {
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "hyprlock";
unlock_cmd = "pkill -USR1 hyprlock";
before_sleep_cmd = "niri msg action power-off-monitors && hyprlock";
after_sleep_cmd = "niri msg action power-on-monitors";
};
listener = [
{
timeout = 120;
on-timeout = "brightnessctl s 10%-";
on-resume = "brightnessctl s +10%";
}
{
timeout = 300;
on-timeout = "hyprlock";
on-resume = "pkill -USR2 hyprlock";
}
{
timeout = 420;
on-timeout = "niri msg action power-off-monitors";
on-resume = "niri msg action power-on-monitors";
}
{
timeout = 600;
on-timeout = "systemctl suspend";
}
];
};
};
home.packages = with pkgs; [
hypridle
];
}