diff --git a/Assets/settings-default.json b/Assets/settings-default.json index bad0e5f2..ec5ba7d7 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -127,6 +127,7 @@ "doNotDisturb": false, "monitors": [], "location": "top_right", + "alwaysOnTop": false, "lastSeenTs": 0, "respectExpireTimeout": false, "lowUrgencyDuration": 3, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 55f7a09f..251a0c82 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -248,6 +248,7 @@ Singleton { property bool doNotDisturb: false property list monitors: [] property string location: "top_right" + property bool alwaysOnTop: false property real lastSeenTs: 0 property bool respectExpireTimeout: false property int lowUrgencyDuration: 3 diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index 956bfd3a..fc74380e 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -39,7 +39,7 @@ Variants { screen: modelData WlrLayershell.namespace: "noctalia-notifications" - WlrLayershell.layer: WlrLayer.Top + WlrLayershell.layer: (Settings.isLoaded && Settings.data && Settings.data.notifications && Settings.data.notifications.alwaysOnTop) ? WlrLayer.Overlay : WlrLayer.Top color: Color.transparent diff --git a/Modules/SettingsPanel/Tabs/NotificationsTab.qml b/Modules/SettingsPanel/Tabs/NotificationsTab.qml index b14f6275..1730156c 100644 --- a/Modules/SettingsPanel/Tabs/NotificationsTab.qml +++ b/Modules/SettingsPanel/Tabs/NotificationsTab.qml @@ -71,6 +71,13 @@ ColumnLayout { currentKey: Settings.data.notifications.location || "top_right" onSelected: key => Settings.data.notifications.location = key } + + NToggle { + label: "Always on top" + description: "Display notifications above fullscreen windows and other layers." + checked: Settings.data.notifications.alwaysOnTop + onToggled: checked => Settings.data.notifications.alwaysOnTop = checked + } } NDivider {