aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/island/Keyboard.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/island/Keyboard.qml')
-rw-r--r--desktop/island/Keyboard.qml7
1 files changed, 2 insertions, 5 deletions
diff --git a/desktop/island/Keyboard.qml b/desktop/island/Keyboard.qml
index 1cbe9bc..0cd73c8 100644
--- a/desktop/island/Keyboard.qml
+++ b/desktop/island/Keyboard.qml
@@ -26,9 +26,6 @@ Singleton {
property string keymap: ""
readonly property string flag: Logic.flagFor(keymap)
- readonly property string mainKeyboard:
- "hyprctl devices -j | jq -r '.keyboards[] | select(.main) | .name'"
-
Process {
id: query
running: true
@@ -46,8 +43,8 @@ Singleton {
// dir is "next" or "prev", from the caller's own literal, never user text.
function cycle(dir) {
- switcher.command = ["sh", "-c",
- `hyprctl switchxkblayout "$(${root.mainKeyboard})" ${dir}`];
+ // "current" is Hyprland's own name for the main keyboard.
+ switcher.command = ["hyprctl", "switchxkblayout", "current", dir];
switcher.running = false;
switcher.running = true;
}