From 748faf92c10428ab6bd4c90df394c635b07635d6 Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 11 Nov 2025 23:51:01 -0500 Subject: [PATCH] add modal and notification layer overrides --- Modals/Common/DankModal.qml | 13 ++++++++++++- Modules/Notifications/Popup/NotificationPopup.qml | 14 ++++++++++++++ Widgets/DankPopout.qml | 13 ++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Modals/Common/DankModal.qml b/Modals/Common/DankModal.qml index 3b357bfd..084c0496 100644 --- a/Modals/Common/DankModal.qml +++ b/Modals/Common/DankModal.qml @@ -75,7 +75,18 @@ PanelWindow { visible: shouldBeVisible color: "transparent" - WlrLayershell.layer: WlrLayershell.Top // if set to overlay -> virtual keyboards can be stuck under modal + WlrLayershell.layer: { + switch (Quickshell.env("DMS_MODAL_LAYER")) { + case "bottom": + return WlrLayershell.Bottom + case "overlay": + return WlrLayershell.Overlay + case "background": + return WlrLayershell.Background + default: + return WlrLayershell.Top + } + } WlrLayershell.exclusiveZone: -1 WlrLayershell.keyboardFocus: shouldHaveFocus ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None onVisibleChanged: { diff --git a/Modules/Notifications/Popup/NotificationPopup.qml b/Modules/Notifications/Popup/NotificationPopup.qml index de358557..a066af7e 100644 --- a/Modules/Notifications/Popup/NotificationPopup.qml +++ b/Modules/Notifications/Popup/NotificationPopup.qml @@ -64,6 +64,20 @@ PanelWindow { visible: hasValidData WlrLayershell.layer: { + const envLayer = Quickshell.env("DMS_NOTIFICATION_LAYER") + if (envLayer) { + switch (envLayer) { + case "bottom": + return WlrLayershell.Bottom + case "overlay": + return WlrLayershell.Overlay + case "background": + return WlrLayershell.Background + case "top": + return WlrLayershell.Top + } + } + if (!notificationData) return WlrLayershell.Top diff --git a/Widgets/DankPopout.qml b/Widgets/DankPopout.qml index 358734bc..1cc3afc0 100644 --- a/Widgets/DankPopout.qml +++ b/Widgets/DankPopout.qml @@ -65,7 +65,18 @@ PanelWindow { } color: "transparent" - WlrLayershell.layer: WlrLayershell.Top + WlrLayershell.layer: { + switch (Quickshell.env("DMS_DANKBAR_LAYER")) { + case "bottom": + return WlrLayershell.Bottom + case "overlay": + return WlrLayershell.Overlay + case "background": + return WlrLayershell.Background + default: + return WlrLayershell.Top + } + } WlrLayershell.exclusiveZone: -1 WlrLayershell.keyboardFocus: shouldBeVisible ? keyboardFocusMode : WlrKeyboardFocus.None