124 lines
2.8 KiB
Nix
124 lines
2.8 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper";
|
|
clockFont = "JetBrains Mono";
|
|
in {
|
|
imports = [
|
|
./scripts/typewriter.nix
|
|
./scripts/random-text.nix
|
|
];
|
|
programs.hyprlock = {
|
|
# FIXME: `greeting` has as inconsistency in pos for different monitors
|
|
enable = true;
|
|
extraConfig = ''
|
|
source = ~/.config/hypr/hyprlock-colors.conf
|
|
|
|
general {
|
|
hide_cursor = true
|
|
grace = 0
|
|
}
|
|
|
|
background {
|
|
monitor =
|
|
path = ${cacheWallpaper}
|
|
blur_passes = 3
|
|
blur_size = 8
|
|
contrast = 0.9
|
|
brightness = 0.7
|
|
vibrancy = 0.2
|
|
}
|
|
|
|
# Greeting (above clock)
|
|
label {
|
|
monitor = DP-1
|
|
text = cmd[update:1000] hakase-hyprlock-text-generator
|
|
color = $on_surface_variant
|
|
font_size = 120
|
|
font_family = ${clockFont} Bold
|
|
position = 0, 480
|
|
halign = center
|
|
valign = center
|
|
}
|
|
|
|
# Hours (top)
|
|
label {
|
|
monitor =
|
|
text = cmd[update:1000] date +%H
|
|
color = $on_surface
|
|
font_size = 140
|
|
font_family = ${clockFont} Bold
|
|
position = 0, 80
|
|
halign = center
|
|
valign = center
|
|
}
|
|
|
|
# Minutes (bottom)
|
|
label {
|
|
monitor =
|
|
text = cmd[update:1000] date +%M
|
|
color = $primary
|
|
font_size = 140
|
|
font_family = ${clockFont} Bold
|
|
position = 0, -80
|
|
halign = center
|
|
valign = center
|
|
}
|
|
|
|
# Date
|
|
label {
|
|
monitor =
|
|
text = cmd[update:60000] date '+%A, %B %d'
|
|
color = $on_surface_variant
|
|
font_size = 18
|
|
font_family = ${clockFont}
|
|
position = 0, -320
|
|
halign = center
|
|
valign = center
|
|
}
|
|
|
|
# Caps Lock indicator (above input)
|
|
label {
|
|
monitor =
|
|
text = cmd[update:100] cat /sys/class/leds/*capslock*/brightness 2>/dev/null | grep -q 1 && echo 'CAPS LOCK'
|
|
color = $tertiary
|
|
font_size = 12
|
|
font_family = ${clockFont}
|
|
position = 0, -210
|
|
halign = center
|
|
valign = center
|
|
}
|
|
|
|
input-field {
|
|
monitor =
|
|
size = 300, 50
|
|
outline_thickness = 3
|
|
dots_size = 0.33
|
|
dots_spacing = 0.15
|
|
dots_center = true
|
|
outer_color = $primary
|
|
inner_color = $surface
|
|
font_color = $on_surface
|
|
fade_on_empty = false
|
|
placeholder_text = <i>Password...</i>
|
|
hide_input = false
|
|
rounding = 15
|
|
position = 0, -250
|
|
halign = center
|
|
valign = center
|
|
|
|
# Auth feedback
|
|
check_color = $secondary
|
|
fail_color = $error
|
|
fail_text = <i>$FAIL</i> <b>($ATTEMPTS)</b>
|
|
fail_timeout = 2000
|
|
fail_transition = 300
|
|
}
|
|
|
|
|
|
'';
|
|
};
|
|
}
|