diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-02-10 14:18:43 +0100 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-02-10 19:51:44 +0100 |
commit | 8fcfb113614c3736999ec48198d7ee9411968927 (patch) | |
tree | 75f554a116a0ebfb58b78c055c89edcbf7903d4e /configuration/home-manager/hyprland.nix | |
parent | a911f15b769ffd0b53471a74e210f00b29b34d28 (diff) |
hypridle lock and screen off
Diffstat (limited to 'configuration/home-manager/hyprland.nix')
-rw-r--r-- | configuration/home-manager/hyprland.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/configuration/home-manager/hyprland.nix b/configuration/home-manager/hyprland.nix index 08af2a1..0129385 100644 --- a/configuration/home-manager/hyprland.nix +++ b/configuration/home-manager/hyprland.nix @@ -166,6 +166,29 @@ in preload = [ "${wallpaper}" ]; wallpaper = [ ",${wallpaper}" ]; }; + services.hypridle.enable = true; + services.hypridle.settings = { + general = { + lock_cmd = "pidof hyprlock || hyprlock"; + }; + + listener = [ + { + timeout = 60; + on-timeout = "brightnessctl -s set 10"; + on-resume = "brightnessctl -r"; + } + { + timeout = 120; + on-timeout = "pidof hyprlock || hyprlock"; + } + { + timeout = 300; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; programs.hyprlock.enable = true; programs.hyprlock.settings = { |