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

desktop-widgets: add overlay IPC and overview option

This commit is contained in:
bbedward
2025-12-22 20:29:01 -05:00
parent 91385e7c83
commit 61630e447b
5 changed files with 173 additions and 12 deletions

View File

@@ -21,6 +21,10 @@ Item {
readonly property bool isBuiltin: pluginId === "desktopClock" || pluginId === "systemMonitor"
readonly property var activeComponent: isBuiltin ? builtinComponent : PluginService.pluginDesktopComponents[pluginId] ?? null
readonly property bool showOnOverlay: instanceData?.config?.showOnOverlay ?? false
readonly property bool showOnOverview: instanceData?.config?.showOnOverview ?? false
readonly property bool overviewActive: CompositorService.isNiri && NiriService.inOverview
Connections {
target: PluginService
enabled: !root.isBuiltin
@@ -202,7 +206,15 @@ Item {
color: "transparent"
WlrLayershell.namespace: "quickshell:desktop-widget:" + root.pluginId + (root.instanceId ? ":" + root.instanceId : "")
WlrLayershell.layer: root.isInteracting && !CompositorService.useHyprlandFocusGrab ? WlrLayer.Overlay : WlrLayer.Bottom
WlrLayershell.layer: {
if (root.isInteracting && !CompositorService.useHyprlandFocusGrab)
return WlrLayer.Overlay;
if (root.showOnOverlay)
return WlrLayer.Overlay;
if (root.showOnOverview && root.overviewActive)
return WlrLayer.Overlay;
return WlrLayer.Bottom;
}
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: {
if (!root.isInteracting)