Files
nixos-blueprint/hosts/sarien/work_user/desktop/sway/hyprlock.nix
unexplrd 2e6e28ef32 initial
2025-02-06 00:33:06 +02:00

105 lines
3.3 KiB
Nix

{
pkgs,
config,
lib,
...
}: {
options = {
component.hyprlock.enable =
lib.mkEnableOption "enable hyprlock";
};
config = lib.mkIf config.component.hyprlock.enable {
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
#grace = 300;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "274, 50";
rounding = 12;
outline_thickness = 4;
position = "0, -30";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_family = "${config.stylix.fonts.serif.name}";
font_color = "rgb(${config.lib.stylix.colors.base05})";
inner_color = "rgb(${config.lib.stylix.colors.base00})";
outer_color = "rgb(${config.lib.stylix.colors.base0D})";
check_color = "rgb(${config.lib.stylix.colors.base0A})";
fail_color = "rgb(${config.lib.stylix.colors.base08})";
placeholder_text = "locked...";
fail_text = "wrong";
#placeholder_text = '\'<span foreground="##cad3f5">Password...</span>'\';
shadow_passes = 0;
}
];
shape = [
{
rounding = 12;
#border_size = 3;
size = "150, 50";
color = "rgb(${config.lib.stylix.colors.base00})";
border_color = "rgb(${config.lib.stylix.colors.base0D})";
position = "-62, 30";
halign = "center";
valign = "center";
}
{
rounding = 12;
#border_size = 3;
size = "120, 50";
color = "rgb(${config.lib.stylix.colors.base00})";
border_color = "rgb(${config.lib.stylix.colors.base0D})";
position = "77, 28";
halign = "center";
valign = "center";
}
];
label = [
{
monitor = "";
text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)";
#text = "$TIME
text_align = "center";
font_size = 16;
font_family = "${config.stylix.fonts.serif.name}";
outer_color = "rgb(${config.lib.stylix.colors.base00})";
color = "rgb(${config.lib.stylix.colors.base05})";
position = "-62, 28";
halign = "center";
valign = "center";
}
{
monitor = "";
text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)";
#text = "$TIME
text_align = "center";
font_size = 16;
font_family = "${config.stylix.fonts.serif.name}";
outer_color = "rgb(${config.lib.stylix.colors.base00})";
color = "rgb(${config.lib.stylix.colors.base05})";
position = "77, 28";
halign = "center";
valign = "center";
}
];
};
};
};
}