summaryrefslogtreecommitdiffstats
path: root/roles/waybar/templates
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-01-09 22:56:19 +0100
committerAhmed Abdelhalim <[email protected]>2026-01-09 22:56:19 +0100
commitf5bbe772a62bf4c8c6a2dad60e178138ec0fdea3 (patch)
tree28c0c28e72fb5dfab4327fab191c09260bd836f5 /roles/waybar/templates
parent90cb3bb148ced36bfb3eb262b6cbfff5193ea97a (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/templates')
-rw-r--r--roles/waybar/templates/waybar/config.jsonc.j22
-rw-r--r--roles/waybar/templates/waybar/scripts/kb-layout-cycle8
2 files changed, 1 insertions, 9 deletions
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