From 0dea1ec9781c265df6a4ece3d5dc282da87d0b03 Mon Sep 17 00:00:00 2001 From: Sho Date: Sun, 2 Aug 2026 02:09:50 +0900 Subject: [PATCH] fix: eliminate Workspace Manager UI lag with optimistic state updates and 120ms high-speed sync --- quickshell/services/WorkspaceService.qml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/quickshell/services/WorkspaceService.qml b/quickshell/services/WorkspaceService.qml index 9e7ec19..dad8420 100644 --- a/quickshell/services/WorkspaceService.qml +++ b/quickshell/services/WorkspaceService.qml @@ -13,12 +13,10 @@ Item { property var workspaceNames: [] function switchTo(index) { - switchProc.command = ["python3", Quickshell.env("HOME") + "/.config/quickshell/services/python/workspace_service.py", "switch", index.toString()] - switchProc.running = true - } - - Process { - id: switchProc + if (index <= 0) return; + // Optimistic UI update for zero visual latency + root.activeWorkspace = index + Quickshell.execDetached(["python3", Quickshell.env("HOME") + "/.config/quickshell/services/python/workspace_service.py", "switch", index.toString()]) } Process { @@ -51,7 +49,7 @@ Item { } Timer { - interval: 400 + interval: 120 running: true repeat: true onTriggered: {