screenshot tool: add layer regions

This commit is contained in:
end-4
2025-06-29 00:23:19 +02:00
parent 4b17b1aae7
commit 36db4ae327
4 changed files with 131 additions and 18 deletions
@@ -16,14 +16,20 @@ Singleton {
property var addresses: []
property var windowByAddress: ({})
property var monitors: []
property var layers: ({})
function updateWindowList() {
getClients.running = true
getMonitors.running = true
}
function updateLayers() {
getLayers.running = true
}
Component.onCompleted: {
updateWindowList()
updateLayers()
}
Connections {
@@ -56,6 +62,7 @@ Singleton {
}
}
}
Process {
id: getMonitors
command: ["bash", "-c", "hyprctl monitors -j | jq -c"]
@@ -65,5 +72,15 @@ Singleton {
}
}
}
Process {
id: getLayers
command: ["bash", "-c", "hyprctl layers -j | jq -c"]
stdout: SplitParser {
onRead: (data) => {
root.layers = JSON.parse(data)
}
}
}
}