2024-09-09 00:22:14 +00:00
|
|
|
{
|
2024-09-13 01:50:53 +00:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.custom.programs.hyprlock;
|
|
|
|
in {
|
|
|
|
options.custom.programs.hyprlock.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.hyprlock.enable = true; # Grant PAM access
|
|
|
|
|
|
|
|
# https://github.com/hyprwm/hyprlock
|
|
|
|
home-manager.users.${config.custom.username}.programs.hyprlock = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-11-12 19:33:14 +00:00
|
|
|
# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
|
|
|
|
# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlang/#comments
|
2024-09-09 00:22:14 +00:00
|
|
|
settings = {
|
|
|
|
general = {
|
2024-11-12 19:33:14 +00:00
|
|
|
disable_loading_bar = true;
|
|
|
|
enable_fingerprint = true; # Enter not required
|
|
|
|
fingerprint_present_message = "<span foreground='##d33682'></span>";
|
|
|
|
fingerprint_ready_message = "";
|
2024-09-09 00:22:14 +00:00
|
|
|
grace = 5 * 60; # Seconds
|
|
|
|
hide_cursor = true;
|
2024-11-12 19:33:14 +00:00
|
|
|
ignore_empty_input = true;
|
2024-09-09 18:42:25 +00:00
|
|
|
no_fade_in = true; # Fix suspend interrupting animation
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
background = {
|
|
|
|
blur_passes = 5;
|
2024-11-12 19:33:14 +00:00
|
|
|
color = "rgb(073642)"; # Fallback
|
2024-09-09 00:22:14 +00:00
|
|
|
path = "/tmp/wallpaper.png";
|
|
|
|
};
|
|
|
|
|
|
|
|
input-field = {
|
|
|
|
capslock_color = "rgb(cb4b16)";
|
|
|
|
check_color = "rgb(859900)";
|
2024-11-12 19:33:14 +00:00
|
|
|
fade_on_empty = false;
|
2024-09-09 00:22:14 +00:00
|
|
|
fade_timeout = 0;
|
|
|
|
fail_color = "rgb(dc322f)";
|
|
|
|
fail_text = "";
|
2024-11-12 19:33:14 +00:00
|
|
|
font_color = "rgb(93a1a1)";
|
2024-09-09 00:22:14 +00:00
|
|
|
inner_color = "rgb(002b36)";
|
2024-11-12 19:33:14 +00:00
|
|
|
outer_color = "rgb(d33682)";
|
|
|
|
outline_thickness = 3;
|
2024-09-09 00:22:14 +00:00
|
|
|
placeholder_text = "";
|
|
|
|
position = "0, 0";
|
2024-11-12 19:33:14 +00:00
|
|
|
size = "500, 50";
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
|
2024-11-12 19:33:14 +00:00
|
|
|
label = [
|
|
|
|
# Time
|
|
|
|
{
|
|
|
|
color = "rgb(93a1a1)";
|
|
|
|
font_family = config.custom.font.sans-serif;
|
|
|
|
font_size = 64;
|
|
|
|
halign = "center";
|
|
|
|
position = "0, 200";
|
2024-09-09 00:22:14 +00:00
|
|
|
|
2024-11-12 19:33:14 +00:00
|
|
|
# BUG: Noon displayed as 00:00, fixed > v0.5.0
|
|
|
|
# https://github.com/hyprwm/hyprlock/issues/552
|
|
|
|
#// text = "$TIME12";
|
|
|
|
text = ''cmd[update:1000] echo "$(date +'%I:%M %p')"''; # 12:00 AM
|
|
|
|
|
|
|
|
text_align = "center";
|
|
|
|
valign = "center";
|
|
|
|
}
|
|
|
|
|
|
|
|
# Date
|
|
|
|
{
|
|
|
|
color = "rgb(93a1a1)";
|
|
|
|
font_family = config.custom.font.sans-serif;
|
|
|
|
font_size = 32;
|
|
|
|
halign = "center";
|
|
|
|
position = "0, 100";
|
|
|
|
text = ''cmd[update:60000] echo "$(date +'%a %b %d')"''; # Sun Jan 01
|
|
|
|
text_align = "center";
|
|
|
|
valign = "center";
|
|
|
|
}
|
|
|
|
|
|
|
|
# Fingerprint
|
|
|
|
{
|
|
|
|
color = "rgb(93a1a1)";
|
|
|
|
font_family = config.custom.font.monospace;
|
2024-11-14 15:59:59 +00:00
|
|
|
font_size = 42;
|
2024-11-12 19:33:14 +00:00
|
|
|
halign = "center";
|
|
|
|
position = "0, -100";
|
|
|
|
text = "$FPRINTMESSAGE";
|
|
|
|
text_align = "center";
|
|
|
|
valign = "center";
|
|
|
|
}
|
|
|
|
];
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|