1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

desktop widgets: niri overview only option + grid on overlay when on

overview
This commit is contained in:
bbedward
2026-01-05 13:01:10 -05:00
parent 824792cca7
commit ef7d7ec13d
2 changed files with 27 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ Item {
readonly property bool showOnOverlay: instanceData?.config?.showOnOverlay ?? false
readonly property bool showOnOverview: instanceData?.config?.showOnOverview ?? false
readonly property bool showOnOverviewOnly: instanceData?.config?.showOnOverviewOnly ?? false
readonly property bool overviewActive: CompositorService.isNiri && NiriService.inOverview
Connections {
@@ -203,7 +204,13 @@ Item {
PanelWindow {
id: widgetWindow
screen: root.screen
visible: root.widgetEnabled && root.activeComponent !== null
visible: {
if (!root.widgetEnabled || root.activeComponent === null)
return false;
if (root.showOnOverviewOnly)
return root.overviewActive;
return true;
}
color: "transparent"
WlrLayershell.namespace: "quickshell:desktop-widget:" + root.pluginId + (root.instanceId ? ":" + root.instanceId : "")
@@ -212,7 +219,7 @@ Item {
return WlrLayer.Overlay;
if (root.showOnOverlay)
return WlrLayer.Overlay;
if (root.showOnOverview && root.overviewActive)
if (root.overviewActive && (root.showOnOverview || root.showOnOverviewOnly))
return WlrLayer.Overlay;
return WlrLayer.Bottom;
}
@@ -543,7 +550,7 @@ Item {
mask: Region {}
WlrLayershell.namespace: "quickshell:desktop-widget-grid"
WlrLayershell.layer: WlrLayer.Background
WlrLayershell.layer: root.overviewActive && (root.showOnOverview || root.showOnOverviewOnly) ? WlrLayer.Overlay : WlrLayer.Background
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None