flakes/modules/user/hyprlock.nix

132 lines
3.4 KiB
Nix
Raw Normal View History

2025-03-17 15:16:11 +11:00
{ ... }: {
programs.hyprlock = {
enable = true;
2025-03-17 16:20:47 +11:00
settings = {
2025-03-17 16:35:21 +11:00
general = {
disable_loading_bar = true;
hide_cursor = true;
};
2025-03-17 16:20:47 +11:00
auth = {
fingerprint = {
enabled = true;
ready_message = "Scan fingerprint to unlock";
2025-03-17 16:20:47 +11:00
};
};
2025-03-17 16:35:21 +11:00
background = {
monitor = "";
color = "$base";
};
2025-03-18 19:41:03 +11:00
shape = [
# Battery pill
{
monitor = "";
size = "165, 65";
color = "$crust";
rounding = -1;
halign = "right";
valign = "top";
position = "-595,-10";
}
# Time pill
{
monitor = "";
size = "545, 65";
color = "$crust";
rounding = -1;
halign = "right";
valign = "top";
position = "-40,-10";
}
];
2025-03-17 16:35:21 +11:00
label = [
2025-03-17 17:44:32 +11:00
# Fingerprint icon
{
monitor = "";
color = "$text";
font_family = "Material Symbols Outlined";
font_size = 64;
halign = "center";
valign = "top";
position = "0, -100";
text = "";
}
# Fingerprint text
{
monitor = "";
color = "$text";
text = "$FPRINTPROMPT";
font_size = 25;
font_family = "Open Sans";
position = "0, -235";
halign = "center";
valign = "top";
}
# Fail text under input
{
monitor = "";
color = "$red";
font_family = "Open Sans";
font_size = 25;
text = "$FAIL $ATTEMPTS[]";
position = "0, -200";
halign = "center";
valign = "center";
}
2025-03-18 19:41:03 +11:00
# Battery icon
2025-03-17 16:35:21 +11:00
{
monitor = "";
2025-03-18 19:41:03 +11:00
text = "";
color = "$accent";
font_family = "Material Symbols Outlined";
font_size = 27;
position = "-695, -20";
2025-03-17 16:35:21 +11:00
halign = "right";
valign = "top";
}
2025-03-18 19:41:03 +11:00
# Battery percentage
2025-03-17 16:35:21 +11:00
{
monitor = "";
2025-03-18 19:41:03 +11:00
text = ''cmd[update:60000] echo "<span weight='700'>$(cat /sys/class/power_supply/BATT/capacity)%</span>"'';
2025-03-17 16:35:21 +11:00
color = "$text";
2025-03-18 19:41:03 +11:00
font_size = 23;
2025-03-17 16:35:21 +11:00
font_family = "Open Sans";
2025-03-18 19:41:03 +11:00
position = "-625, -20";
2025-03-17 16:35:21 +11:00
halign = "right";
valign = "top";
}
2025-03-18 19:41:03 +11:00
# Time and Date
{
monitor = "";
color = "$text";
font_family = "Open Sans";
font_size = 23;
halign = "right";
valign = "top";
position = "-70, -20";
text = ''cmd[update:1000] echo "<span alpha='70%' weight='550'>$(date '+%A, %d %B %Y')</span> <span weight='700'>$(date +%H:%M)</span><span alpha='70%' weight='550'>$(date +:%S)</span>"'';
}
2025-03-17 16:35:21 +11:00
];
input-field = {
monitor = "";
2025-03-17 17:44:32 +11:00
size = "600, 120";
2025-03-17 16:35:21 +11:00
outline_thickness = 4;
2025-03-17 17:44:32 +11:00
check_color = "$peach";
2025-03-17 16:35:21 +11:00
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
2025-03-17 17:44:32 +11:00
fail_text = "";
2025-03-17 16:35:21 +11:00
font_color = "$text";
2025-03-17 17:44:32 +11:00
inner_color = "$crust";
outer_color = "$base";
placeholder_text = "Password";
2025-03-17 16:35:21 +11:00
fade_on_empty = false;
hide_input = false;
capslock_color = "$yellow";
position = "0, -47";
halign = "center";
valign = "center";
};
2025-03-17 16:20:47 +11:00
};
2025-03-17 15:16:11 +11:00
};
}