From 1001119829dc7a2e014d75b43f454383e35ee896 Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sun, 16 Mar 2025 22:07:13 +0000 Subject: [PATCH] hyprland: extract hypridle --- users/jordan/graphical/hyprland/default.nix | 24 +---------------- users/jordan/graphical/hyprland/hypridle.nix | 28 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 users/jordan/graphical/hyprland/hypridle.nix diff --git a/users/jordan/graphical/hyprland/default.nix b/users/jordan/graphical/hyprland/default.nix index 58f8466..11cf02d 100644 --- a/users/jordan/graphical/hyprland/default.nix +++ b/users/jordan/graphical/hyprland/default.nix @@ -5,6 +5,7 @@ { imports = [ + ./hypridle.nix ./hyprlock.nix ./hyprpaper.nix ]; @@ -172,29 +173,6 @@ }; }; - services.hypridle = { - enable = false; - settings = { - general = { - after_sleep_cmd = "hyprctl dispatch dpms on"; - ignore_dbus_inhibit = false; - lock_cmd = "hyprlock"; - }; - - listener = [ - { - timeout = 900; - on-timeout = "hyprlock"; - } - { - timeout = 1200; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - ]; - }; - }; - home.packages = with pkgs.unstable; [ adw-gtk3 anyrun diff --git a/users/jordan/graphical/hyprland/hypridle.nix b/users/jordan/graphical/hyprland/hypridle.nix new file mode 100644 index 0000000..16c5fd6 --- /dev/null +++ b/users/jordan/graphical/hyprland/hypridle.nix @@ -0,0 +1,28 @@ +{ + ... +}: + +{ + services.hypridle = { + enable = false; + settings = { + general = { + after_sleep_cmd = "hyprctl dispatch dpms on"; + ignore_dbus_inhibit = false; + lock_cmd = "hyprlock"; + }; + + listener = [ + { + timeout = 900; + on-timeout = "hyprlock"; + } + { + timeout = 1200; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; +}