Krolyxon
Commit 2d6af20

Branches

Refs →

aurora2d6af20

hypr: hyprlock styled like aurora

Author
krolyxon
Date
2026-10-24 11:16 +0530
Parent
759167e
Commit
2d6af20bc62dc51e523bf8d8d2ae1e56e5b5b48c

+109 −30

2 files changed

  1. M .config/hypr/hyprlock.conf +90 −30
  2. M .config/quickshell/aurora/Theme.qml +19 −0
M .config/hypr/hyprlock.conf View
@@ -1,60 +1,120 @@
1−# -- pywal colors --
1+# hyprlock, styled like aurora (flat, square, accent borders, JetBrains Mono).
2+# Colours: pywal first as a fallback, then aurora's resolved palette (incl. the accent picked in its settings),
3+# written by aurora's Theme.qml to ~/.config/aurora/hyprlock-colors.conf.
24 source = $HOME/.cache/wal/colors-hyprland.conf
5+$bg = $background
6+$fg = $foreground
7+$accent = $color14
8+$accentDim = $color6
9+$surface = $color0
10+$surfaceHi = $color8
11+$line = $color8
12+$dim = $color8
13+$err = $color1
14+$font = JetBrainsMono Nerd Font
15+source = $HOME/.config/aurora/hyprlock-colors.conf
316
417 general {
518 hide_cursor = true
6− no_fade_in = false
7− grace = 0
8− disable_loading_bar = true
19+ ignore_empty_input = true
920 }
1021
11−
1222 background {
13− monitor =
14− blur_passes = 0
15− color = $background
23+ monitor =
24+ color = $bg
25+}
26+
27+# -- frame --
28+shape {
29+ monitor =
30+ size = 420, 300
31+ color = $surface
32+ rounding = 0
33+ border_size = 1
34+ border_color = $line
35+ position = 0, 20
36+ halign = center
37+ valign = center
1638 }
1739
18−# -- time --
1940 label {
2041 monitor =
21− text = cmd[update:1000] echo "$(date +"%H:%M")"
22− color = $color7
23− font_size = 80
24− font_family = JetBrainsMono Nerd Font
25− position = 0, 100
42+ text = <b>LOCKED</b>
43+ color = $accent
44+ font_size = 11
45+ font_family = $font
46+ position = 0, 135
2647 halign = center
2748 valign = center
2849 }
2950
51+# -- time / date --
52+label {
53+ monitor =
54+ text = cmd[update:1000] echo "<b>$(date +%H:%M)</b>"
55+ color = $fg
56+ font_size = 64
57+ font_family = $font
58+ position = 0, 70
59+ halign = center
60+ valign = center
61+}
3062
31−# -- greeting --
3263 label {
3364 monitor =
34− text = Hello $USER
35− color = $foreground
36− font_size = 20
37− font_family = JetBrainsMono Nerd Font
38− position = 0, 0
65+ text = cmd[update:60000] date '+%A %d %B' | tr a-z A-Z
66+ color = $accent
67+ font_size = 12
68+ font_family = $font
69+ position = 0, 10
3970 halign = center
4071 valign = center
4172 }
4273
43−# -- password input --
74+# -- password --
4475 input-field {
4576 monitor =
46− size = 230, 40
47− outline_thickness = 0
48− dots_size = 0.2
77+ size = 340, 42
78+ rounding = 0
79+ outline_thickness = 2
80+ outer_color = $accent
81+ inner_color = $bg
82+ font_color = $fg
83+ font_family = $font
84+ check_color = $accentDim
85+ fail_color = $err
86+ capslock_color = $accentDim
87+ dots_size = 0.22
4988 dots_spacing = 0.4
89+ dots_rounding = 0
5090 dots_center = true
51− inner_color = $color1
52− font_color = $color7
5391 fade_on_empty = false
54− placeholder_text = <span foreground='white'><i>Escape the Matrix</i></span>
55− fail_color = $color7
56− hide_input = false
57− position = 0, -50
92+ placeholder_text = PASSWORD
93+ fail_text = $FAIL ($ATTEMPTS)
94+ position = 0, -60
5895 halign = center
5996 valign = center
6097 }
98+
99+# -- status line --
100+label {
101+ monitor =
102+ text = cmd[update:0] echo "$USER@$(cat /etc/hostname)"
103+ color = $dim
104+ font_size = 11
105+ font_family = $font
106+ position = 20, 16
107+ halign = left
108+ valign = bottom
109+}
110+
111+label {
112+ monitor =
113+ text = cmd[update:5000] echo "$(mpc current 2>/dev/null | sed 's/&/\&amp;/g; s/</\&lt;/g') BAT $(cat /sys/class/power_supply/BAT0/capacity)%"
114+ color = $dim
115+ font_size = 11
116+ font_family = $font
117+ position = -20, 16
118+ halign = right
119+ valign = bottom
120+}
M .config/quickshell/aurora/Theme.qml View
@@ -87,6 +87,25 @@ Singleton {
8787 readonly property color cursorC: wal.special.cursor
8888 readonly property color bgA: Qt.rgba(bg.r, bg.g, bg.b, panelAlpha)
8989
90+ // ---- hyprlock -----------------------------------------------------
91+ // hyprlock stays a separate process (crash safety); it sources ~/.config/aurora/hyprlock-colors.conf,
92+ // written here so the lock uses the resolved palette (incl. the settings-picked accent).
93+ readonly property string lockFile: Quickshell.env("HOME") + "/.config/aurora/hyprlock-colors.conf"
94+ readonly property string lockConf: {
95+ function c(v) {
96+ var h = n => ("0" + Math.round(n * 255).toString(16)).slice(-2)
97+ return "rgba(" + h(v.r) + h(v.g) + h(v.b) + h(v.a) + ")"
98+ }
99+ return ["# generated by aurora (Theme.qml); edit the palette there, not here",
100+ "$bg = " + c(bg), "$fg = " + c(fg), "$accent = " + c(accent), "$accentDim = " + c(accentDim),
101+ "$surface = " + c(surface), "$surfaceHi = " + c(surfaceHi), "$line = " + c(line),
102+ "$dim = " + c(dim), "$err = " + c(err), "$font = " + font, ""].join("\n")
103+ }
104+ onLockConfChanged: lockTimer.restart()
105+ Timer { id: lockTimer; interval: 500; onTriggered: lockFv.setText(root.lockConf) }
106+ FileView { id: lockFv; path: root.lockFile; printErrors: false }
107+ Component.onCompleted: lockTimer.restart()
108+
90109 // ---- Nerd Font (Material Design) glyphs ---------------------------
91110 function cp(c) {
92111 c -= 0x10000