{ config, lib, ... }: let text = "rgb(${config.theme.colors.text})"; error = "rgb(${config.theme.colors.error})"; trans = "rgba(0,0,0,0)"; inherit (lib) mkIf; cfg = config.apps.hyprlock; in { config = mkIf cfg.enable { default.lockScreen = lib.mkDefault "hyprlock"; programs.hyprlock = { enable = true; settings = { auth = { "pam:enabled" = true; "fingerprint:enabled" = config.fingerprint; }; animations = { enabled = true; bezier = [ "linear, 1, 1, 1, 1" ]; animation = [ "fade, 1, 3, linear" ]; }; background = { path = config.theme.lockscreen; blur_passes = 2; contrast = 0.9; brightness = 0.8; vibrancy = 0.2; vibrancy_darkness = 0.0; }; # Password Input input-field = { size = "250, 60"; outline_thickness = 2; dots_size = 0.2; dots_spacing = 0.5; dots_center = true; dots_rounding = -1; outer_color = trans; inner_color = trans; font_color = text; fade_on_empty = false; placeholder_text = "Enter Password" + ( if config.fingerprint then " or Touch Fingerprint" else "" ); hide_input = false; check_color = error; fail_color = error; capslock_color = trans; numlock_color = trans; bothlock_color = trans; 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 = 30; font_family = config.theme.font.header; position = "0, -50"; halign = "center"; valign = "center"; } # Clock { text = "cmd[update:1000] echo \"$(date +\"%k:%M\")\""; color = text; font_size = 130; font_family = config.theme.font.header; position = "0, 130"; halign = "center"; valign = "center"; } ]; }; }; }; }