From 35088aaaf3dc0b20fd1089b0e33ef6fb0ac3438b Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Sun, 8 Feb 2026 17:41:25 +0100 Subject: Add capslock indicator in waybar --- roles/waybar/templates/waybar/config.jsonc.j2 | 12 +++++++++++- roles/waybar/templates/waybar/style.css.j2 | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'roles') diff --git a/roles/waybar/templates/waybar/config.jsonc.j2 b/roles/waybar/templates/waybar/config.jsonc.j2 index f02e0a50..98dddb63 100644 --- a/roles/waybar/templates/waybar/config.jsonc.j2 +++ b/roles/waybar/templates/waybar/config.jsonc.j2 @@ -17,6 +17,7 @@ "pulseaudio", "backlight", "hyprland/language", + "keyboard-state", "cpu", "battery" ], @@ -86,9 +87,18 @@ "format-icons": ["", ""] }, "hyprland/language": { - "format": "{shortDescription}", + "format": " {shortDescription}", "on-click": "hyprctl switchxkblayout all next" }, + "keyboard-state": { + "numlock": false, + "capslock": true, + "format": "{icon}", + "format-icons": { + "locked": "󰘲", + "unlocked": "" + } + }, "cpu": { "interval": 5, "format": "󰍛", diff --git a/roles/waybar/templates/waybar/style.css.j2 b/roles/waybar/templates/waybar/style.css.j2 index dc46a297..ee6f2296 100644 --- a/roles/waybar/templates/waybar/style.css.j2 +++ b/roles/waybar/templates/waybar/style.css.j2 @@ -94,6 +94,10 @@ tooltip { color: @activeColor; } +#keyboard-state label.locked { + padding: 0px 10px 0px 0px; +} + #battery.charging, #battery.plugged, #battery.full { color: #32CD32; } -- cgit v1.2.3