diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-02-16 16:28:53 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-02-16 16:28:53 +0100 |
| commit | c3bb987272091e1993227f3a19a1bc515476ebf0 (patch) | |
| tree | efa5caeaa81a0bf0855efc9cfc3a9c7628735566 | |
| parent | 9f13fc942ecc910528d37a0e387b1b17b55ce320 (diff) | |
Fix waybar capslock issue by providing the kbd dev path
| -rw-r--r-- | host_vars/archlinux.local.yml | bin | 793 -> 908 bytes | |||
| -rw-r--r-- | roles/waybar/tasks/main.yml | 21 | ||||
| -rw-r--r-- | roles/waybar/templates/waybar/config.jsonc.j2 | 3 |
3 files changed, 12 insertions, 12 deletions
diff --git a/host_vars/archlinux.local.yml b/host_vars/archlinux.local.yml Binary files differindex b4a56a4c..e3ab1701 100644 --- a/host_vars/archlinux.local.yml +++ b/host_vars/archlinux.local.yml 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": { |
