From 1a51f2f555b182673e3f9b3e38fb2ab0e57dd6c2 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 23 Jan 2025 09:26:51 -0500 Subject: reconfigure --- nix/programs/hypr/hypridle.nix | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 nix/programs/hypr/hypridle.nix (limited to 'nix/programs/hypr/hypridle.nix') diff --git a/nix/programs/hypr/hypridle.nix b/nix/programs/hypr/hypridle.nix new file mode 100644 index 0000000..85718e2 --- /dev/null +++ b/nix/programs/hypr/hypridle.nix @@ -0,0 +1,47 @@ +{ config, lib, ... }: + +{ + home-manager.users.${config.user} = { + services.hypridle = { + + enable = true; + + settings = { + general = { + lock_cmd = "pidof hyprlock || hyprlock"; + 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"; + } + # dim keyboard backlight + { + timeout = 150; + on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0"; + on-resume = "brightnessctl -rd rgb:kbd_backlight"; + } + # 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