#! █░█ █▄█ █▀█ █▀█ █░░ █▀█ █▀▀ █▄▀
#! █▀█ ░█░ █▀▀ █▀▄ █▄▄ █▄█ █▄▄ █░█
#* Hyprlock Configuration File
# Everything is anchored to the CENTRE (only the two bottom-corner labels use valign), in this
# order top to bottom: uptime, greeting, logo, input field, clock, date. The offsets spread the
# content out to the top and bottom edges. Centre-anchoring is deliberate: an earlier pass used
# TOP/BOTTOM valign bands and silently reordered the clock and date, putting the date above the
# clock and the clock half off the bottom edge — don't reintroduce that.
# Every `position` and `size` is a percentage (hyprlock accepts them: both are LAYOUTCONFIG
# values), so the arrangement scales instead of being the fixed pixel offsets it once was.
# The percentages are the old pixel offsets expressed against a 1080-tall screen.
#
# `font_size` and `image:size` are plain ints in hyprlock 0.9.6 and cannot take a
# percentage, so they can't scale on their own. They're hoisted into the variables below:
# retune those few numbers for a very different screen (they are tuned for wm, 3072x1728 logical),
# or `source` a per-host file that redefines them, as kitty.conf does with host.conf.
#
# Coordinates: +x is right, +y is UP — so centre-anchored, a positive y sits above centre.
# (For the two bottom-corner labels, valign = bottom means positive y moves up from it.)
$fontColor = rgba(255,255,255,0.5)
$fontFamily = SourceCodeVF ExtraBold
$timeFontFamily = Cantarell ExtraBold
# Type scale — tuned for wm's 3072x1728 logical screen (this file is shared with lw —
# see ToDo.md). Since these can't be
# percentages, they are the one thing to retune on a very different display: they are
# roughly clock 13%, date 2.5%, meta 1.5% of screen height.
$fsClock = 220
$fsDate = 44
$fsMeta = 26
$fsSmall = 24
$fsIcon = 40
$logoSize = 280
# Vertical positions — % of screen height from centre, + is up. Order top to bottom: uptime,
# greet, logo, input, clock, date. Deliberately pushed OUT to the edges: uptime/greet ride near
# the top, clock/date near the bottom, leaving logo + input as the only things near the middle.
# Anchored to centre rather than valign top/bottom on purpose — an earlier pass used bands and
# silently reordered the clock and date (see the header). Percentages scale, and because each
# host's font sizes are set to the same *proportion* of its screen (clock ~12.8% of height on
# both), one set of offsets gives both hosts the same layout — hence no per-host override here
# by default. Add $y* to hyprlock-host.conf if a host ever needs to differ.
$yUptime = 45%
$yGreet = 41%
$yLogo = 12%
$yInput = -5%
$yClock = -30%
$yDate = -42%
# Per-host override for the six sizes above. They are ints, not percentages, so they are the
# one thing that cannot scale itself — a host with a different panel redefines whichever it
# needs here, and everything below picks up the new value (hyprlang expands in file order).
# Shipped empty in gui/ so this always resolves even mid-install, before a host overlay is
# stowed — same idiom, and same reason, as hypr/host.conf.
source = ~/.config/hypr/hyprlock-host.conf
general {
ignore_empty_input = true
text_trim = true
}
# Dropped as of hyprlock 0.9.6 — it rejected all four as "config option does not exist"
# and carried on without them, so they never took effect:
# no_fade_in / fade_in_time -> fade-in is CLI-only now: lockscreen.sh --no-fade-in
# grade, disable_loading_bar -> no equivalent
background {
monitor =
path = ~/.config/hypr/hyprlock/assets/background.jpg
# Heavier blur than you'd expect: the wallpaper has "open source" set across its
# middle, which otherwise reads as text competing with the clock sitting on top of it.
blur_passes = 3
blur_size = 6
contrast = 0.7
brightness = 0.38
vibrancy = 0.15
vibrancy_darkness = 0.5
}
# // ▀█▀ █▀█ █▀█
# // ░█░ █▄█ █▀▀
# uptime
label {
monitor =
text = cmd[update:5000] echo "$(uptime -p)"
color = $fontColor
font_family = $fontFamily
font_size = $fsMeta
position = 0, $yUptime
halign = center
valign = center
}
# greeting / weather
label {
monitor =
text = cmd[update:300000] echo "$(cat ~/.config/fish/greet.txt)"
color = $fontColor
font_family = $fontFamily
font_size = $fsSmall
position = 0, $yGreet
halign = center
valign = center
}
# // █▀▄▀█ █ █▀▄ █▀▄ █░░ █▀▀
# // █░▀░█ █ █▄▀ █▄▀ █▄▄ ██▄
image {
monitor =
path = ~/.config/hypr/hyprlock/assets/logo.jpg
size = $logoSize
position = 0, $yLogo
halign = center
valign = center
reload_time = -1
reload_cmd =
}
input-field {
monitor =
size = 20%, 5%
position = 0, $yInput
halign = center
valign = center
outline_thickness = 3
dots_size = 0.08
dots_spacing = 0.2
dots_center = true
outer_color = rgba(0,0,0,0.1)
inner_color = $fontColor
fade_on_empty = true
}
# // █▄▄ █▀█ ▀█▀ ▀█▀ █▀█ █▀▄▀█
# // █▄█ █▄█ ░█░ ░█░ █▄█ █░▀░█
# date — sits BELOW the clock (-28% vs the clock's -17%), as it did before the band rewrite.
label {
monitor =
text = cmd[update:1000] echo "$(LC_TIME=en_US.UTF-8 date +'%A, %B %d')"
color = $fontColor
font_family = $fontFamily
font_size = $fsDate
position = 0, $yDate
halign = center
valign = center
}
# clock — 17% below centre, directly under the input field, with the date below it. Centre-
# anchored, so y is the box's CENTRE and the glyphs grow both ways from it; budget for that
# when changing $fsClock, which is by far the tallest text here.
label {
monitor =
text = cmd[update:1000] echo "$(date +"%H:%M")"
color = $fontColor
font_family = $timeFontFamily
font_size = $fsClock
position = 0, $yClock
halign = center
valign = center
shadow_passes = 1
shadow_size = 1
shadow_color = rgba(0, 0, 0, 0.5)
}
# power
label {
monitor =
text = cmd[] echo "⏻ "
color = $fontColor
font_size = $fsIcon
onclick = systemctl poweroff
position = 3%, 3%
halign = left
valign = bottom
}
# battery (prints nothing on a desktop)
label {
monitor =
text = cmd[update:1000] echo -e "$(~/.config/hypr/battery.sh)"
color = $fontColor
font_family = $fontFamily
font_size = $fsSmall
position = -3%, 3%
halign = right
valign = bottom
}