From 3ab4a9b663688d5c4db0942af21ca3cc8c1e79c9 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Fri, 23 Feb 2024 12:21:53 +1300 Subject: [PATCH] feat: hyprlock configuration --- .../wayland/lockscreen/hyprlock/default.nix | 55 +++++++++++++++++++ .../wayland/lockscreen/swaylock/default.nix | 1 + .../wayland/windowManager/hyprland/binds.nix | 4 +- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/home/modules/desktop/wayland/lockscreen/hyprlock/default.nix b/home/modules/desktop/wayland/lockscreen/hyprlock/default.nix index ac98886..e0e5c11 100644 --- a/home/modules/desktop/wayland/lockscreen/hyprlock/default.nix +++ b/home/modules/desktop/wayland/lockscreen/hyprlock/default.nix @@ -9,8 +9,63 @@ in imports = [ inputs.hyprlock.homeManagerModules.hyprlock ]; config = lib.mkIf cfg.enable { + home.sessionVariables.LOCKER = "hyprlock"; programs.hyprlock = { enable = true; + general = { + hide_cursor = true; + no_fade_in = true; + }; + backgrounds = [ + { + monitor = ""; + path = ""; + color = "0xff${colors.base01}"; + } + ]; + input-fields = [ + { + size = { + width = 300; + height = 40; + }; + position = { + x = 0; + y = 0; + }; + outline_thickness = 2; + dots_spacing = 0.2; + fade_on_empty = false; + placeholder_text = ""; + outer_color = "0xff${colors.base02}"; + inner_color = "0xff${colors.base00}"; + font_color = "0xff${colors.base05}"; + } + ]; + labels = [ + { + monitor = ""; + text = ""; + position = { + x = 0; + y = 80; + }; + color = "0xff${colors.base08}"; + font_size = 30; + font_family = "${config.fontProfiles.monospace.family}"; + } + { + monitor = ""; + text = "$TIME"; + position = { + x = 0; + y = -80; + }; + color = "0xff${colors.base0B}"; + font_size = 20; + font_family = "${config.fontProfiles.monospace.family}"; + } + ]; }; }; diff --git a/home/modules/desktop/wayland/lockscreen/swaylock/default.nix b/home/modules/desktop/wayland/lockscreen/swaylock/default.nix index 7f6660e..837ec50 100644 --- a/home/modules/desktop/wayland/lockscreen/swaylock/default.nix +++ b/home/modules/desktop/wayland/lockscreen/swaylock/default.nix @@ -6,6 +6,7 @@ let in { config = lib.mkIf cfg.enable { + home.sessionVariables.LOCKER = "swaylock"; programs.swaylock = { enable = true; settings = { diff --git a/home/modules/desktop/wayland/windowManager/hyprland/binds.nix b/home/modules/desktop/wayland/windowManager/hyprland/binds.nix index 50a220f..d6e853b 100644 --- a/home/modules/desktop/wayland/windowManager/hyprland/binds.nix +++ b/home/modules/desktop/wayland/windowManager/hyprland/binds.nix @@ -59,11 +59,11 @@ in terminal = config.home.sessionVariables.TERMINAL; browser = config.home.sessionVariables.BROWSER; editor = config.home.sessionVariables.EDITOR; + locker = config.home.sessionVariables.LOCKER; bright = "${brightnessScript}/bin/brightness"; volume = "${volumeScript}/bin/volume"; - swaylock = "${config.programs.swaylock.package}/bin/swaylock"; spotifyctl = "${pkgs.spotify-player}/bin/spotify_player"; discord = "${pkgs.vesktop}/bin/vesktop"; @@ -168,7 +168,7 @@ in "SUPERSHIFT, 0, movetoworkspace,10" # Lock Screen - "SUPER, Backspace, exec, ${swaylock}" + "SUPER, Backspace, exec, ${locker}" ]; # Mouse bindm = [