From 435f077f982ba880ce69275fee2ee4d2a19d8b67 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 29 Apr 2025 15:43:19 +1000 Subject: hyprland: fix active workspace --- services/Hyprland.qml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/services/Hyprland.qml b/services/Hyprland.qml index 513d372..d786e62 100644 --- a/services/Hyprland.qml +++ b/services/Hyprland.qml @@ -12,7 +12,7 @@ Singleton { readonly property var workspaces: Hyprland.workspaces readonly property var monitors: Hyprland.monitors property var activeClient: null - property HyprlandWorkspace activeWorkspace: null + property HyprlandWorkspace activeWorkspace: focusedMonitor?.activeWorkspace ?? null property HyprlandMonitor focusedMonitor: Hyprland.monitors.values.find(m => m.lastIpcObject.focused) ?? null function reload() { @@ -20,7 +20,6 @@ Singleton { Hyprland.refreshMonitors(); getClients.running = true; getActiveClient.running = true; - getActiveWorkspace.running = true; } function dispatch(request: string): void { @@ -72,15 +71,4 @@ Singleton { } } } - - Process { - id: getActiveWorkspace - command: ["bash", "-c", "hyprctl -j activeworkspace | jq -c"] - stdout: SplitParser { - onRead: data => { - const ws = JSON.parse(data); - root.activeWorkspace = root.workspaces.values.find(w => w.id === ws.id) ?? null; - } - } - } } -- cgit v1.2.3-freya