summaryrefslogtreecommitdiff
path: root/services/Hyprland.qml
diff options
context:
space:
mode:
Diffstat (limited to 'services/Hyprland.qml')
-rw-r--r--services/Hyprland.qml6
1 files changed, 2 insertions, 4 deletions
diff --git a/services/Hyprland.qml b/services/Hyprland.qml
index e774a33..7bb9458 100644
--- a/services/Hyprland.qml
+++ b/services/Hyprland.qml
@@ -30,7 +30,7 @@ Singleton {
return;
if (n === "activelayout") {
- kbProc.running = true;
+ root.kbLayout = event.parse(2)[1].slice(0, 2).toLowerCase();
} else if (["workspace", "moveworkspace", "activespecial", "focusedmon"].includes(n)) {
Hyprland.refreshWorkspaces();
Hyprland.refreshMonitors();
@@ -48,12 +48,10 @@ Singleton {
}
Process {
- id: kbProc
-
running: true
command: ["hyprctl", "-j", "devices"]
stdout: StdioCollector {
- onStreamFinished: root.kbLayout = JSON.parse(text).keyboards.find(k => k.main).layout
+ onStreamFinished: root.kbLayout = JSON.parse(text).keyboards.find(k => k.main).active_keymap.slice(0, 2).toLowerCase()
}
}
}