mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-08 20:55:16 +00:00
fix: resolve MangoService window parsing scope and add KeyboardLayoutService import
This commit is contained in:
@@ -3,6 +3,7 @@ import Quickshell
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Commons
|
import qs.Commons
|
||||||
import qs.Services.UI
|
import qs.Services.UI
|
||||||
|
import qs.Services.Keyboard
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
@@ -126,7 +127,7 @@ Item {
|
|||||||
|
|
||||||
onRunningChanged: {
|
onRunningChanged: {
|
||||||
if (running) {
|
if (running) {
|
||||||
currentWindow = {}
|
windowsProcess.currentWindow = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,8 +142,8 @@ Item {
|
|||||||
const property = parts[1]
|
const property = parts[1]
|
||||||
const value = parts.slice(2).join(' ')
|
const value = parts.slice(2).join(' ')
|
||||||
|
|
||||||
if (!currentWindow[outputName]) {
|
if (!windowsProcess.currentWindow[outputName]) {
|
||||||
currentWindow[outputName] = {
|
windowsProcess.currentWindow[outputName] = {
|
||||||
id: outputName,
|
id: outputName,
|
||||||
output: outputName
|
output: outputName
|
||||||
}
|
}
|
||||||
@@ -150,29 +151,29 @@ Item {
|
|||||||
|
|
||||||
switch (property) {
|
switch (property) {
|
||||||
case "title":
|
case "title":
|
||||||
currentWindow[outputName].title = value
|
windowsProcess.currentWindow[outputName].title = value
|
||||||
break
|
break
|
||||||
case "appid":
|
case "appid":
|
||||||
currentWindow[outputName].appId = value
|
windowsProcess.currentWindow[outputName].appId = value
|
||||||
currentWindow[outputName].class = value
|
windowsProcess.currentWindow[outputName].class = value
|
||||||
break
|
break
|
||||||
case "fullscreen":
|
case "fullscreen":
|
||||||
currentWindow[outputName].fullscreen = (value === "1")
|
windowsProcess.currentWindow[outputName].fullscreen = (value === "1")
|
||||||
break
|
break
|
||||||
case "floating":
|
case "floating":
|
||||||
currentWindow[outputName].floating = (value === "1")
|
windowsProcess.currentWindow[outputName].floating = (value === "1")
|
||||||
break
|
break
|
||||||
case "x":
|
case "x":
|
||||||
currentWindow[outputName].x = parseInt(value)
|
windowsProcess.currentWindow[outputName].x = parseInt(value)
|
||||||
break
|
break
|
||||||
case "y":
|
case "y":
|
||||||
currentWindow[outputName].y = parseInt(value)
|
windowsProcess.currentWindow[outputName].y = parseInt(value)
|
||||||
break
|
break
|
||||||
case "width":
|
case "width":
|
||||||
currentWindow[outputName].width = parseInt(value)
|
windowsProcess.currentWindow[outputName].width = parseInt(value)
|
||||||
break
|
break
|
||||||
case "height":
|
case "height":
|
||||||
currentWindow[outputName].height = parseInt(value)
|
windowsProcess.currentWindow[outputName].height = parseInt(value)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,12 +182,12 @@ Item {
|
|||||||
|
|
||||||
onExited: function (exitCode) {
|
onExited: function (exitCode) {
|
||||||
if (exitCode === 0) {
|
if (exitCode === 0) {
|
||||||
parseWindows(currentWindow)
|
parseWindows(windowsProcess.currentWindow)
|
||||||
} else {
|
} else {
|
||||||
Logger.e("MangoService", "Windows query failed:", exitCode)
|
Logger.e("MangoService", "Windows query failed:", exitCode)
|
||||||
}
|
}
|
||||||
accumulatedOutput = ""
|
accumulatedOutput = ""
|
||||||
currentWindow = {}
|
windowsProcess.currentWindow = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user