mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
overview: show windows on other monitors too
This commit is contained in:
parent
4df22c96d0
commit
a15f3b8c65
2 changed files with 7 additions and 5 deletions
|
|
@ -149,14 +149,15 @@ Item {
|
||||||
const address = `0x${toplevel.HyprlandToplevel.address}`
|
const address = `0x${toplevel.HyprlandToplevel.address}`
|
||||||
var win = windowByAddress[address]
|
var win = windowByAddress[address]
|
||||||
const inWorkspaceGroup = (root.workspaceGroup * root.workspacesShown < win?.workspace?.id && win?.workspace?.id <= (root.workspaceGroup + 1) * root.workspacesShown)
|
const inWorkspaceGroup = (root.workspaceGroup * root.workspacesShown < win?.workspace?.id && win?.workspace?.id <= (root.workspaceGroup + 1) * root.workspacesShown)
|
||||||
const inMonitor = root.monitor?.id === win.monitor
|
return inWorkspaceGroup;
|
||||||
return inWorkspaceGroup && inMonitor;
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delegate: OverviewWindow {
|
delegate: OverviewWindow {
|
||||||
id: window
|
id: window
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
property int monitorId: windowData?.monitor
|
||||||
|
property var monitor: HyprlandData.monitors[monitorId]
|
||||||
property var address: `0x${modelData.HyprlandToplevel.address}`
|
property var address: `0x${modelData.HyprlandToplevel.address}`
|
||||||
windowData: windowByAddress[address]
|
windowData: windowByAddress[address]
|
||||||
toplevel: modelData
|
toplevel: modelData
|
||||||
|
|
@ -164,9 +165,7 @@ Item {
|
||||||
scale: root.scale
|
scale: root.scale
|
||||||
availableWorkspaceWidth: root.workspaceImplicitWidth
|
availableWorkspaceWidth: root.workspaceImplicitWidth
|
||||||
availableWorkspaceHeight: root.workspaceImplicitHeight
|
availableWorkspaceHeight: root.workspaceImplicitHeight
|
||||||
|
widgetMonitorId: root.monitor.id
|
||||||
property int monitorId: windowData?.monitor
|
|
||||||
property var monitor: HyprlandData.monitors[monitorId]
|
|
||||||
|
|
||||||
property bool atInitPosition: (initX == x && initY == y)
|
property bool atInitPosition: (initX == x && initY == y)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ Item { // Window
|
||||||
property real initY: Math.max((windowData?.at[1] - (monitorData?.y ?? 0) - monitorData?.reserved[1]) * root.scale, 0) + yOffset
|
property real initY: Math.max((windowData?.at[1] - (monitorData?.y ?? 0) - monitorData?.reserved[1]) * root.scale, 0) + yOffset
|
||||||
property real xOffset: 0
|
property real xOffset: 0
|
||||||
property real yOffset: 0
|
property real yOffset: 0
|
||||||
|
property int widgetMonitorId: 0
|
||||||
|
|
||||||
property var targetWindowWidth: windowData?.size[0] * scale
|
property var targetWindowWidth: windowData?.size[0] * scale
|
||||||
property var targetWindowHeight: windowData?.size[1] * scale
|
property var targetWindowHeight: windowData?.size[1] * scale
|
||||||
|
|
@ -40,6 +41,7 @@ Item { // Window
|
||||||
y: initY
|
y: initY
|
||||||
width: windowData?.size[0] * root.scale
|
width: windowData?.size[0] * root.scale
|
||||||
height: windowData?.size[1] * root.scale
|
height: windowData?.size[1] * root.scale
|
||||||
|
opacity: windowData.monitor == widgetMonitorId ? 1 : 0.4
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
|
|
@ -69,6 +71,7 @@ Item { // Window
|
||||||
captureSource: GlobalStates.overviewOpen ? root.toplevel : null
|
captureSource: GlobalStates.overviewOpen ? root.toplevel : null
|
||||||
live: true
|
live: true
|
||||||
|
|
||||||
|
// Color overlay for interactions
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: Appearance.rounding.windowRounding * root.scale
|
radius: Appearance.rounding.windowRounding * root.scale
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue