diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 1eed4f8..8f94827 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -516,7 +516,7 @@ in signal notificationReceived() NotificationServer { - id: notifServer + id: _notifServer bodySupported: true actionsSupported: true imageSupported: true @@ -533,16 +533,12 @@ in model: Quickshell.screens Bar { - notifServer: notifServer + notifServer: _notifServer } } - Variants { - model: Quickshell.screens - - NotificationToast { - shellRoot: root - } + NotificationToast { + shellRoot: root } } ''; @@ -1725,22 +1721,24 @@ in onChange = qsRestart; text = '' import Quickshell + import Quickshell.Wayland import QtQuick - PopupWindow { + PanelWindow { id: notifToast - required property var modelData required property var shellRoot - screen: modelData + screen: Quickshell.screens[0] property var currentNotif: null property bool open: false + WlrLayershell.layer: WlrLayer.Overlay + WlrLayershell.namespace: "quickshell-toast" + exclusionMode: ExclusionMode.Ignore + Connections { target: shellRoot function onNotificationReceived() { - if (notifToast.modelData === Quickshell.screens[0]) { - notifToast.show(shellRoot.latestNotification); - } + notifToast.show(shellRoot.latestNotification); } } @@ -1756,9 +1754,8 @@ in _toastCloseDelay.start(); } - anchor.rect.x: (screen ? screen.width / 2 : 0) - 160 - anchor.rect.y: 30 - anchor.edges: Edges.Top | Edges.Left + anchors.top: true + margins.top: 30 visible: false implicitWidth: 320 implicitHeight: toastContent.height + 2