diff --git a/hyprland/hypr/hypridle.nix b/hyprland/hypr/hypridle.nix new file mode 100644 index 0000000..b8b0ca6 --- /dev/null +++ b/hyprland/hypr/hypridle.nix @@ -0,0 +1,22 @@ +{ + services.hypridle = { + enable = true; + settings = { + general = { + inhibit_sleep = 3; + }; + + listener = [ + { + timeout = 300; + on-timeout = "pidof hyprlock || hyprlock"; + } + { + timeout = 900; + on-timeout = "systemctl suspend"; + } + ]; + }; + }; +} + diff --git a/hyprland/hypr/hyprland.nix b/hyprland/hypr/hyprland.nix index 0f52587..0adf538 100644 --- a/hyprland/hypr/hyprland.nix +++ b/hyprland/hypr/hyprland.nix @@ -1,7 +1,9 @@ { imports = [ - ../programs/fuzzel.nix - ../programs/kitty.nix + ./hypridle.nix + ./hyprlock.nix + ../raw/fuzzel.nix + ../raw/kitty.nix ../scripts/powermenu.nix ../scripts/screenshot.nix ../scripts/themeswitch.nix