summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-02-08 17:41:25 +0100
committerAhmed Abdelhalim <[email protected]>2026-02-08 17:41:25 +0100
commit35088aaaf3dc0b20fd1089b0e33ef6fb0ac3438b (patch)
treeb69abc52bf1bb0e8f412ba9a4f9a5e6c8f1a03c9
parent5b7a3dc5370772ffbfdc52b2b145e35d1061caa8 (diff)
Add capslock indicator in waybar
-rw-r--r--roles/waybar/templates/waybar/config.jsonc.j212
-rw-r--r--roles/waybar/templates/waybar/style.css.j24
2 files changed, 15 insertions, 1 deletions
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;
}