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://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
|
|
|
|
# https://github.com/hyprwm/hyprlock
|
|
|
|
home-manager.users.${config.custom.username}.programs.hyprlock = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
general = {
|
|
|
|
grace = 5 * 60; # Seconds
|
|
|
|
hide_cursor = true;
|
2024-09-09 23:23:26 +00:00
|
|
|
#// immediate_render = 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;
|
|
|
|
color = "rgb(073642)";
|
|
|
|
path = "/tmp/wallpaper.png";
|
|
|
|
};
|
|
|
|
|
|
|
|
input-field = {
|
|
|
|
capslock_color = "rgb(cb4b16)";
|
|
|
|
check_color = "rgb(859900)";
|
|
|
|
fade_timeout = 0;
|
|
|
|
fail_color = "rgb(dc322f)";
|
|
|
|
fail_text = "";
|
|
|
|
font_color = "rgb(fdf6e3)";
|
|
|
|
inner_color = "rgb(002b36)";
|
|
|
|
outer_color = "rgb(fdf6e3)";
|
|
|
|
outline_thickness = 0;
|
|
|
|
placeholder_text = "";
|
|
|
|
position = "0, 0";
|
|
|
|
shadow_passes = 1;
|
|
|
|
shadow_size = 2;
|
|
|
|
size = "300, 50";
|
|
|
|
};
|
|
|
|
|
|
|
|
label = {
|
|
|
|
color = "rgb(fdf6e3)";
|
2024-09-21 15:47:31 +00:00
|
|
|
font_family = config.custom.font.monospace;
|
2024-09-09 00:22:14 +00:00
|
|
|
font_size = 48;
|
|
|
|
halign = "center";
|
|
|
|
position = "0, 200";
|
|
|
|
text_align = "center";
|
|
|
|
valign = "center";
|
|
|
|
|
|
|
|
# 12:00 AM
|
|
|
|
# Sunday, January 01
|
|
|
|
text = "cmd[update:1000] echo \"<span allow_breaks='true'>$(date +'%I:%M %p<br/><small>%A, %B %d</small>')</span>\"";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|