fix: eliminate Workspace Manager UI lag with optimistic state updates and 120ms high-speed sync

This commit is contained in:
Sho 2026-08-02 02:09:50 +09:00
parent 4fac2f05da
commit 0dea1ec978

View File

@ -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: {