diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-27 16:39:14 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-27 16:39:14 -0400 |
commit | 2e4c4298cf84f94d68387e8076fd430e9968ce6c (patch) | |
tree | 2a43fa6d4659fe2585c75aeec3ee4d5e0a42de2e /modules/apps/hyprlock.nix | |
parent | fmt (diff) | |
download | dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.gz dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.bz2 dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.zip |
refactor
Diffstat (limited to 'modules/apps/hyprlock.nix')
-rw-r--r-- | modules/apps/hyprlock.nix | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/modules/apps/hyprlock.nix b/modules/apps/hyprlock.nix new file mode 100644 index 0000000..4a844e3 --- /dev/null +++ b/modules/apps/hyprlock.nix @@ -0,0 +1,87 @@ +{ + config, + lib, + ... +}: let + text = "rgb(${config.theme.colors.text})"; + base = "rgb(${config.theme.colors.base})"; + error = "rgb(${config.theme.colors.error})"; + trans = "rgba(0,0,0,0)"; + + inherit (lib) mkIf; + cfg = config.apps; +in { + config = mkIf cfg.hyprlock { + default.lockScreen = lib.mkDefault "hyprlock"; + + home-manager.users.${config.user} = { + programs.hyprlock = { + enable = true; + + settings = { + background = { + path = config.theme.lockscreen; + color = base; + blur_passes = 0; + blur_size = 2; + noise = 0; + contrast = 0; + brightness = 0; + vibrancy = 0; + vibrancy_darkness = 0.0; + }; + + # Password Input + input-field = { + size = "300, 50"; + outline_thickness = 0; + dots_size = 0.25; + dots_spacing = 0.55; + dots_center = true; + dots_rounding = -1; + outer_color = trans; + inner_color = trans; + font_color = text; + fade_on_empty = false; + placeholder_text = "Enter Password"; + hide_input = false; + check_color = error; + fail_color = error; + capslock_color = -1; + numlock_color = -1; + bothlock_color = -1; + invert_numlock = false; + swap_font_color = false; + font_family = config.theme.font.regular; + position = "0, 50"; + halign = "center"; + valign = "bottom"; + }; + + label = [ + # Date + { + text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\""; + color = text; + font_size = 20; + font_family = config.theme.font.header; + position = "0, -100"; + halign = "center"; + valign = "top"; + } + # Clock + { + text = "cmd[update:1000] echo \"$(date +\"%k:%M:%S\")\""; + color = text; + font_size = 90; + font_family = config.theme.font.header; + position = "0, -130"; + halign = "center"; + valign = "top"; + } + ]; + }; + }; + }; + }; +} |