notif popup: show only on focused screen

This commit is contained in:
end-4
2025-05-17 23:57:32 +02:00
parent f76da801fe
commit 4df645a025
@@ -7,25 +7,21 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Quickshell import Quickshell
import Quickshell.Wayland import Quickshell.Wayland
import Quickshell.Hyprland
Scope { Scope {
id: screenCorners id: notificationPopup
readonly property Toplevel activeWindow: ToplevelManager.activeToplevel
Variants {
model: Quickshell.screens
LazyLoader { LazyLoader {
property var modelData
loading: true loading: true
PanelWindow { PanelWindow {
id: root id: root
visible: (columnLayout.children.length > 0 || notificationWidgetList.length > 0) visible: (columnLayout.children.length > 0 || notificationWidgetList.length > 0)
screen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name)
property Component notifComponent: NotificationWidget {} property Component notifComponent: NotificationWidget {}
property list<NotificationWidget> notificationWidgetList: [] property list<NotificationWidget> notificationWidgetList: []
screen: modelData
WlrLayershell.namespace: "quickshell:notificationPopup" WlrLayershell.namespace: "quickshell:notificationPopup"
WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.layer: WlrLayer.Overlay
exclusiveZone: 0 exclusiveZone: 0
@@ -113,5 +109,3 @@ Scope {
} }
} }
}