diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-01-09 22:56:19 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-01-09 22:56:19 +0100 |
| commit | f5bbe772a62bf4c8c6a2dad60e178138ec0fdea3 (patch) | |
| tree | 28c0c28e72fb5dfab4327fab191c09260bd836f5 /roles/waybar | |
| parent | 90cb3bb148ced36bfb3eb262b6cbfff5193ea97a (diff) | |
Fix keyboard layout change
I didn't know that there was a keyboard device called all that can be
used to change the layout of the connected keyboards
Diffstat (limited to 'roles/waybar')
| -rw-r--r-- | roles/waybar/tasks/main.yml | 3 | ||||
| -rw-r--r-- | roles/waybar/templates/waybar/config.jsonc.j2 | 2 | ||||
| -rw-r--r-- | roles/waybar/templates/waybar/scripts/kb-layout-cycle | 8 |
3 files changed, 1 insertions, 12 deletions
diff --git a/roles/waybar/tasks/main.yml b/roles/waybar/tasks/main.yml index 079d5329..2cf3e7b3 100644 --- a/roles/waybar/tasks/main.yml +++ b/roles/waybar/tasks/main.yml @@ -40,6 +40,3 @@ - src: "waybar/scripts/launch-tui" dest: "/etc/xdg/waybar/scripts/launch-tui" mode: "0755" - - src: "waybar/scripts/kb-layout-cycle" - dest: "/etc/xdg/waybar/scripts/kb-layout-cycle" - mode: "0755" diff --git a/roles/waybar/templates/waybar/config.jsonc.j2 b/roles/waybar/templates/waybar/config.jsonc.j2 index bf65a09e..4fec10f8 100644 --- a/roles/waybar/templates/waybar/config.jsonc.j2 +++ b/roles/waybar/templates/waybar/config.jsonc.j2 @@ -87,7 +87,7 @@ }, "hyprland/language": { "format": "{shortDescription}", - "on-click": "/etc/xdg/waybar/scripts/kb-layout-cycle" + "on-click": "hyprctl switchxkblayout all next" }, "cpu": { "interval": 5, diff --git a/roles/waybar/templates/waybar/scripts/kb-layout-cycle b/roles/waybar/templates/waybar/scripts/kb-layout-cycle deleted file mode 100644 index 45cb8464..00000000 --- a/roles/waybar/templates/waybar/scripts/kb-layout-cycle +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# This works on laptops but not sure if on desktops it will have the same name -# That's why switching all the keyboards layout instead (which is safer) -# exec hyprctl switchxkblayout at-translated-set-2-keyboard next -exec hyprctl devices -j \ - | jq -r '.keyboards[] | select (.name | endswith("keyboard")).name' \ - | xargs -I {} hyprctl switchxkblayout {} next |
