# Source colors from pywal
source = ~/.cache/wal/colors-hyprland.conf

##############
# LOCKSCREEN #
##############

# Wiki: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock


# Fonts
$font = Cantarell Regular
$clockFont = Cantarell Black
$minimalFont = Noto Sans Mono

general {
    disable_loading_bar = true
    hide_cursor = false
    text_trim = false
    fractional_scaling = 2
}

auth {
    pam {
        enabled = true
    }

    fingerprint {
        enabled = false
        ready_message = Waiting for Fingerprint
        present_message = Scanning
    }
}

background {
    monitor =
    path = $wallpaper
    blur_passes = 3
    color = $background
}

# Time
label {
    monitor =
    text = cmd[update:30000] echo -n "$(date +"%R")" # 24-hours
    # text = cmd[update:30000] echo -n "$(date +"%I:%M %p")" # 12-hours (AM/PM)
    color = $foreground
    shadow_passes = 1
    shadow_size = 2
    shadow_color = $background
    shadow_boost = 0.4
    font_size = 120
    font_family = $clockFont
    position = 0, -60
    halign = center
    valign = top
}

# Date
label {
    monitor = 
    text = cmd[update:43200000] echo -n "$(date +"%A, %d %B %Y")"
    color = $foreground
    shadow_passes = 1
    shadow_size = 2
    shadow_color = $background
    shadow_boost = 0.4
    font_size = 20
    font_family = $font
    position = 0, -250
    halign = center
    valign = top
}

# Logged user
label {
    monitor = 
    font_size = 6
    font_family = $minimalFont
    color = $foreground
    text = cmd[update:0] echo -n "Logged as $USER in $(hostnamectl hostname)"
    halign = center
    valign = bottom
    position = 0, 5
}

# Media
label {
    monitor =
    font_size = 12
    font_family = Cantarell
    color = $foreground
    text = cmd[update:1000] bash -c 'playerctl metadata && echo -e "󰎇  $(playerctl metadata title) - $(playerctl metadata artist)"' | tail -n 1
    shadow_passes = 1
    shadow_size = 2
    shadow_color = $background
    shadow_boost = 0.4
    halign = center
    valign = center
    position = 0, 180
}

# Avatar
image {
    monitor = 
    path = ~/.face
    size = 72
    border_color = $color2
    border_size = 2
    position = 0, 100
    halign = center
    valign = bottom
    shadow_passes = 1
    shadow_size = 2
    shadow_color = $background
    shadow_boost = 0.4
}

# Input (password)
input-field {
    monitor =
    size = 180, 35
    outline_thickness = 2
    dots_size = .15
    dots_spacing = .6
    dots_center = true
    outer_color = $background
    inner_color = $color3
    font_color = $foreground
    fade_on_empty = false
    placeholder_text = 
    hide_input = false
    check_color = $color4
    fail_color = $color1
    fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
    capslock_color = $color1
    position = 0, 40
    halign = center
    valign = bottom
    shadow_passes = 1
    shadow_size = 2
    shadow_color = $background
    shadow_boost = 0.2
}
