From 88e4d73968a64d6a3d34a8b1cb6c0dba787d4b6f Mon Sep 17 00:00:00 2001 From: tux Date: Mon, 22 Sep 2025 18:38:07 +0530 Subject: [PATCH] feat(hyprland): add hyprlock configuration --- modules/home/desktop/hyprland/default.nix | 5 +++ modules/home/desktop/hyprland/hyprlock.nix | 47 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 modules/home/desktop/hyprland/hyprlock.nix diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index 5253c24..a3ed4ff 100644 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -1,4 +1,6 @@ {pkgs, ...}: { + imports = [./hyprlock.nix]; + home.packages = with pkgs; [astal]; wayland.windowManager.hyprland = { @@ -206,6 +208,9 @@ # shutdown "SUPER_SHIFT, P, exec, poweroff" + # lock + "SUPER_SHIFT, L, exec, hyprlock" + # change focus "SUPER, left, movefocus, l" "SUPER, right, movefocus, r" diff --git a/modules/home/desktop/hyprland/hyprlock.nix b/modules/home/desktop/hyprland/hyprlock.nix new file mode 100644 index 0000000..b7c76f9 --- /dev/null +++ b/modules/home/desktop/hyprland/hyprlock.nix @@ -0,0 +1,47 @@ +{ + programs.hyprlock = { + enable = true; + settings = { + general = { + hide_cursor = true; + ignore_empty_input = true; + }; + + animations = { + enabled = true; + fade_in = { + duration = 300; + bezier = "easeOutQuint"; + }; + fade_out = { + duration = 300; + bezier = "easeOutQuint"; + }; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "200, 50"; + position = "0, -80"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_color = "rgb(202, 211, 245)"; + inner_color = "rgb(91, 96, 120)"; + outer_color = "rgb(24, 25, 38)"; + outline_thickness = 5; + placeholder_text = "Password"; + shadow_passes = 2; + } + ]; + }; + }; +}