summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-02-16 16:28:53 +0100
committerAhmed Abdelhalim <[email protected]>2026-02-16 16:28:53 +0100
commitc3bb987272091e1993227f3a19a1bc515476ebf0 (patch)
treeefa5caeaa81a0bf0855efc9cfc3a9c7628735566 /roles
parent9f13fc942ecc910528d37a0e387b1b17b55ce320 (diff)
Fix waybar capslock issue by providing the kbd dev path
Diffstat (limited to 'roles')
-rw-r--r--roles/waybar/tasks/main.yml21
-rw-r--r--roles/waybar/templates/waybar/config.jsonc.j23
2 files changed, 12 insertions, 12 deletions
diff --git a/roles/waybar/tasks/main.yml b/roles/waybar/tasks/main.yml
index 3e849130..47f026be 100644
--- a/roles/waybar/tasks/main.yml
+++ b/roles/waybar/tasks/main.yml
@@ -2,11 +2,16 @@
- name: "Ensure waybar packages are installed"
become: true
ansible.builtin.package:
- name:
- - "{{ item }}"
+ name: "waybar"
state: "present"
- loop:
- - "waybar"
+
+# This is requried for the keyboard-stats module to work
+- name: "Ensure USER is added to input group"
+ become: true
+ ansible.builtin.user:
+ name: "{{ username }}"
+ groups: "input"
+ append: true
- name: "Ensure waybar configuration directory exists"
become: true
@@ -43,11 +48,3 @@
dest: "/etc/xdg/waybar/scripts/toggle-wifi"
- src: "waybar/scripts/launch-tui"
dest: "/etc/xdg/waybar/scripts/launch-tui"
-
-# This is requried for the keyboard-stats module to work
-- name: "Ensure USER is added to input group"
- become: true
- ansible.builtin.user:
- name: "{{ username }}"
- groups: "input"
- append: true
diff --git a/roles/waybar/templates/waybar/config.jsonc.j2 b/roles/waybar/templates/waybar/config.jsonc.j2
index 4ba63f44..7eef4ac2 100644
--- a/roles/waybar/templates/waybar/config.jsonc.j2
+++ b/roles/waybar/templates/waybar/config.jsonc.j2
@@ -91,6 +91,9 @@
"on-click": "hyprctl switchxkblayout all next"
},
"keyboard-state": {
+{% if waybar_external_kbd_dev_path is defined %}
+ "device-path": "{{ waybar_external_kbd_dev_path }}",
+{% endif %}
"numlock": false,
"capslock": true,
"format": {