forked from Shinonome/dots-hyprland
screenshot tool: add layer regions
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user