From 68d03fe362b7e0df11662d8d6a1e01eac0bfae77 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Wed, 17 Sep 2025 22:07:16 -0400 Subject: refactor: remove modules folder, fully split home and system modules --- home/desktops/hyprland/idle.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 home/desktops/hyprland/idle.nix (limited to 'home/desktops/hyprland/idle.nix') diff --git a/home/desktops/hyprland/idle.nix b/home/desktops/hyprland/idle.nix new file mode 100644 index 0000000..0a2b951 --- /dev/null +++ b/home/desktops/hyprland/idle.nix @@ -0,0 +1,35 @@ +{config, ...}: { + services.hypridle = { + enable = config.desktops.hyprland.enable; + systemdTarget = "hyprland-session.target"; + + settings = { + general = { + lock_cmd = "pidof ${config.default.lockScreen} || ${config.default.lockScreen}"; + before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + ignore_dbus_inhibit = false; + }; + + listener = [ + # dim screen + { + timeout = 150; + on-timeout = "brightnessctl -s set 10"; + on-resume = "brightnessctl -r"; + } + # lock + { + timeout = 300; + on-timeout = "loginctl lock-session"; + } + # turn off screen + { + timeout = 350; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; +} -- cgit v1.2.3-freya