From a49f4ba009d334ac0689a2e925cdbd42aa2cd259 Mon Sep 17 00:00:00 2001 From: atheeq-rhxn Date: Thu, 13 Nov 2025 22:06:06 +0530 Subject: [PATCH] fix: resolve MangoService window parsing scope and add KeyboardLayoutService import --- Services/Compositor/MangoService.qml | 29 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Services/Compositor/MangoService.qml b/Services/Compositor/MangoService.qml index 22e8349e..18c6b058 100644 --- a/Services/Compositor/MangoService.qml +++ b/Services/Compositor/MangoService.qml @@ -3,6 +3,7 @@ import Quickshell import Quickshell.Io import qs.Commons import qs.Services.UI +import qs.Services.Keyboard Item { id: root @@ -126,7 +127,7 @@ Item { onRunningChanged: { if (running) { - currentWindow = {} + windowsProcess.currentWindow = {} } } @@ -141,8 +142,8 @@ Item { const property = parts[1] const value = parts.slice(2).join(' ') - if (!currentWindow[outputName]) { - currentWindow[outputName] = { + if (!windowsProcess.currentWindow[outputName]) { + windowsProcess.currentWindow[outputName] = { id: outputName, output: outputName } @@ -150,29 +151,29 @@ Item { switch (property) { case "title": - currentWindow[outputName].title = value + windowsProcess.currentWindow[outputName].title = value break case "appid": - currentWindow[outputName].appId = value - currentWindow[outputName].class = value + windowsProcess.currentWindow[outputName].appId = value + windowsProcess.currentWindow[outputName].class = value break case "fullscreen": - currentWindow[outputName].fullscreen = (value === "1") + windowsProcess.currentWindow[outputName].fullscreen = (value === "1") break case "floating": - currentWindow[outputName].floating = (value === "1") + windowsProcess.currentWindow[outputName].floating = (value === "1") break case "x": - currentWindow[outputName].x = parseInt(value) + windowsProcess.currentWindow[outputName].x = parseInt(value) break case "y": - currentWindow[outputName].y = parseInt(value) + windowsProcess.currentWindow[outputName].y = parseInt(value) break case "width": - currentWindow[outputName].width = parseInt(value) + windowsProcess.currentWindow[outputName].width = parseInt(value) break case "height": - currentWindow[outputName].height = parseInt(value) + windowsProcess.currentWindow[outputName].height = parseInt(value) break } } @@ -181,12 +182,12 @@ Item { onExited: function (exitCode) { if (exitCode === 0) { - parseWindows(currentWindow) + parseWindows(windowsProcess.currentWindow) } else { Logger.e("MangoService", "Windows query failed:", exitCode) } accumulatedOutput = "" - currentWindow = {} + windowsProcess.currentWindow = {} } }