Sample Header Ad - 728x90

How to show the CapsLock status in hyprlock lockscreen in hyprland?

1 vote
0 answers
143 views
I was trying to show the capslock status on hyprlock , the default screenlock hyprland window manager uses, to avoid unnecessary password failures, as xset -q | sed -n 's/^.*Caps Lock:\s*\(\S*\).*$/\1/p' is not any help for wayland. So far I am able to accomplish this putting in hyperlock conf
label {
    monitor =
    #CapsLock status
    text = cmd[update:500] echo "CapsLock $(cat /sys/class/leds/input*::capslock/brightness)"
    color = rgba(200, 200, 200, 1.0)
    font_size = 25
    font_family = Fira Semibold
    position = 30, 70
    halign = left
    valign = bottom
    shadow_passes = 5
    shadow_size = 10
}
It just shows the status like CapsLock 1 or CapsLock 0 but I think a better result can be achieved calling a script in the conf like CapsLock on.
Asked by Pavel Sayekat (621 rep)
May 25, 2025, 02:35 PM
Last activity: May 26, 2025, 12:00 PM