149 lines
4.7 KiB
Plaintext
149 lines
4.7 KiB
Plaintext
|
|
# 引入 Matugen 生成的颜色文件
|
||
|
|
# 确保 Matugen 已经运行并生成了此文件,否则变量无法解析
|
||
|
|
source = ~/.config/niri/hyprlock-colors.conf
|
||
|
|
|
||
|
|
# 定义字体变量,方便统一修改
|
||
|
|
$font = JetBrains Maple Mono
|
||
|
|
$font_clock = JetBrains Maple Mono
|
||
|
|
|
||
|
|
general {
|
||
|
|
hide_cursor = false # 锁屏时不隐藏鼠标光标
|
||
|
|
ignore_empty_input = true # 开启后,输入框为空时按回车不会显示“验证失败”,而是直接忽略
|
||
|
|
}
|
||
|
|
|
||
|
|
animations {
|
||
|
|
enabled = true
|
||
|
|
# 贝塞尔曲线定义 (控制动画速度变化)
|
||
|
|
bezier = linear, 1, 1, 0, 0
|
||
|
|
# 动画定义: 动画名, 开关(1/0), 持续时间, 曲线
|
||
|
|
animation = fadeIn, 1, 3, linear # 淡入动画
|
||
|
|
animation = fadeOut, 1, 5, linear # 淡出动画
|
||
|
|
animation = inputFieldDots, 1, 2, linear # 输入密码时圆点的跳动动画
|
||
|
|
}
|
||
|
|
|
||
|
|
background {
|
||
|
|
monitor = # 留空表示应用到所有显示器
|
||
|
|
path = screenshot # 使用当前屏幕截图作为背景
|
||
|
|
color = $surface # 如果截图加载失败,使用的默认背景色
|
||
|
|
|
||
|
|
# === 高斯模糊与质感设置 ===
|
||
|
|
# 这些参数共同营造出“磨砂玻璃”的高级感
|
||
|
|
blur_size = 5 # 模糊半径
|
||
|
|
blur_passes = 4 # 模糊迭代次数 (越高越平滑,但消耗性能)
|
||
|
|
noise = 0.01 # 添加轻微噪点,防止色带(banding)并增加胶片感
|
||
|
|
contrast = 1.3000 # 提高对比度,让文字更清晰
|
||
|
|
brightness = 0.8000 # 降低亮度,避免背景太亮抢眼
|
||
|
|
vibrancy = 0.2100 # 增加色彩鲜艳度
|
||
|
|
vibrancy_darkness = 0.0
|
||
|
|
}
|
||
|
|
|
||
|
|
# === 视觉重心上移 (Visual Shift Up) ===
|
||
|
|
# 策略:保持上一版完美的紧凑间距,将整体坐标向上平移约 20%
|
||
|
|
# 这样时间组件会占据屏幕的上三分之一处,留下开阔的中下部空间。
|
||
|
|
|
||
|
|
# Hours (小时)
|
||
|
|
label {
|
||
|
|
monitor =
|
||
|
|
# cmd[update:1000]: 每 1000ms (1秒) 更新一次
|
||
|
|
# <b><big>: Pango 标记语法,用于加粗和放大字体
|
||
|
|
text = cmd[update:1000] echo "<b><big> $(date +"%H") </big></b>"
|
||
|
|
color = $primary # 使用主色调
|
||
|
|
|
||
|
|
font_size = 130
|
||
|
|
font_family = $font_clock
|
||
|
|
|
||
|
|
# 文字阴影设置,增加立体感
|
||
|
|
shadow_passes = 3 # 阴影迭代次数
|
||
|
|
shadow_size = 4 # 阴影扩散大小
|
||
|
|
|
||
|
|
# 上移至 29% (垂直方向)
|
||
|
|
position = 0, 29%
|
||
|
|
halign = center # 水平居中
|
||
|
|
valign = center # 垂直居中
|
||
|
|
}
|
||
|
|
|
||
|
|
# Minutes (分钟)
|
||
|
|
label {
|
||
|
|
monitor =
|
||
|
|
text = cmd[update:1000] echo "<b><big> $(date +"%M") </big></b>"
|
||
|
|
color = $primary
|
||
|
|
|
||
|
|
font_size = 130
|
||
|
|
font_family = $font_clock
|
||
|
|
|
||
|
|
shadow_passes = 3
|
||
|
|
shadow_size = 4
|
||
|
|
|
||
|
|
# 保持 13% 的黄金间距 -> 19% (相对于小时的位置)
|
||
|
|
# 这里的 16% 是绝对位置
|
||
|
|
position = 0, 16%
|
||
|
|
halign = center
|
||
|
|
valign = center
|
||
|
|
}
|
||
|
|
|
||
|
|
# === 日期信息 (Date Info) ===
|
||
|
|
|
||
|
|
# Today (星期几)
|
||
|
|
label {
|
||
|
|
monitor =
|
||
|
|
# cmd[update:18000000]: 更新频率很低,因为星期几很久才变一次,节省资源
|
||
|
|
text = cmd[update:18000000] echo "<b><big> "$(date +'%A')" </big></b>"
|
||
|
|
color = $secondary # 使用次级颜色,建立视觉层级
|
||
|
|
|
||
|
|
font_size = 28
|
||
|
|
font_family = $font
|
||
|
|
|
||
|
|
# 紧随分钟下方 -> 7%
|
||
|
|
position = 0, 7%
|
||
|
|
halign = center
|
||
|
|
valign = center
|
||
|
|
}
|
||
|
|
|
||
|
|
# Week (日期)
|
||
|
|
label {
|
||
|
|
monitor =
|
||
|
|
text = cmd[update:18000000] echo "<b> "$(date +'%b %d')" </b>"
|
||
|
|
color = $secondary
|
||
|
|
|
||
|
|
font_size = 18
|
||
|
|
font_family = $font
|
||
|
|
|
||
|
|
# 收尾 -> 4%
|
||
|
|
position = 0, 4%
|
||
|
|
halign = center
|
||
|
|
valign = center
|
||
|
|
}
|
||
|
|
|
||
|
|
# === 底部交互区 (Interaction Area) ===
|
||
|
|
|
||
|
|
# Input Field (输入框)
|
||
|
|
input-field {
|
||
|
|
monitor =
|
||
|
|
size = 9%, 3.1% # 使用百分比宽高,适配不同分辨率的屏幕
|
||
|
|
outline_thickness = 2 # 边框粗细
|
||
|
|
|
||
|
|
# 密码掩码圆点设置
|
||
|
|
dots_size = 0.26 # 圆点相对于输入框高度的大小
|
||
|
|
dots_spacing = 0.64 # 圆点之间的间距
|
||
|
|
dots_center = true # 圆点垂直居中
|
||
|
|
dots_rounding = -1 # -1 表示完美的圆形
|
||
|
|
|
||
|
|
rounding = 12 # 输入框圆角半径
|
||
|
|
|
||
|
|
# 颜色设置 (支持渐变)
|
||
|
|
# 这里的 outer_color 使用了渐变色: 主色 -> 第三色 -> 主色
|
||
|
|
outer_color = $primary $tertiary $primary
|
||
|
|
inner_color = $surface_container # 输入框背景色
|
||
|
|
font_color = $on_surface # 输入文字颜色
|
||
|
|
check_color = $secondary # 验证中颜色
|
||
|
|
fail_color = $error # 验证失败颜色
|
||
|
|
|
||
|
|
fade_on_empty = false # 即使没有输入内容,输入框也保持显示 (不消失)
|
||
|
|
placeholder_text = <i>Password...</i> # 占位符提示文字 (斜体)
|
||
|
|
|
||
|
|
# 保持在底部 10%,与上方的时间形成极大的张力
|
||
|
|
position = 0, 10%
|
||
|
|
halign = center # 水平居中
|
||
|
|
valign = bottom # 垂直对齐到底部
|
||
|
|
}
|