summaryrefslogtreecommitdiffstats
path: root/roles/hyprland/templates/hypr/hyprlock.conf.j2
blob: 55cb0baff0e43b48a971d309cf5d449d52172fb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# vim: set filetype=hyprlang.ansible :

source = ~/.config/hyprtheme/current/hyprlock.conf

# Variables

general {
    hide_cursor = false
    ignore_empty_input = true
    fail_timeout = 5000
}

auth {
    fingerprint:enabled = false
}

animations {
    enabled = false
}

background {
    monitor =
    # path = ~/.config/hyprtheme/current/background
    color = $color
    blur_passes = 3
}

# Password input
input-field {
    monitor =
    font_family = $font
    font_color = $font_color

    placeholder_text = Enter Password
    fade_on_empty = false
    fail_text = <i>$FAIL ($ATTEMPTS)</i>

    shadow_passes = 0
    rounding = 10
    outline_thickness = 2
    inner_color = $inner_color
    outer_color = $outer_color
    check_color = $check_color
    capslock_color = $capslock_color

    size = 20%, 3%
    halign = center
    valign = center
}

# TIME
label {
    monitor =
    text = $TIME
    font_size = 108
    font_family = $font
    color = $font_color

    halign = right
    valign = top
    position = -30, 0
}

# DATE
label {
    monitor =
    text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds
    font_size = 36
    font_family = $font
    color = $font_color

    halign = right
    valign = top
    position = -30, -150
}

# Keyboard switcher
label {
    monitor =
    text = $LAYOUT
    font_size = 16
    font_family = $font
    color = $font_color

    onclick = hyprctl switchxkblayout all next

    halign = left
    valign = top
    position = 16, -16
}

# Capslock indicator
label {
    monitor =
    text = cmd[update:1000] cat /sys/class/leds/*::capslock/brightness |\
        grep -q 1 && echo "Capslock On" || echo "Capslock Off"

    font_size = 16
    font_family = $font
    color = $font_color

    halign = left
    valign = top
    position = 16, -48
}

# Reboot
label {
    monitor =
    text = <span> 󰑙 </span>
    font_size = 36
    font_family = $font
    color = $font_color

    onclick = /etc/hypr/scripts/power.sh --reboot

    halign = center
    valign = center
    position = 0, -150
}

# Power off
label {
    monitor =
    text = <span>  </span>
    font_size = 36
    font_family = $font
    color = $font_color

    onclick = /etc/hypr/scripts/power.sh --shutdown

    halign = center
    valign = center
    position = -150, -150
}

# Suspend
label {
    monitor =
    text = <span> 󰤄 </span>
    font_size = 36
    font_family = $font
    color = $font_color

    onclick = /etc/hypr/scripts/power.sh --hibernate

    halign = center
    valign = center
    position = 150, -150
}