diff --git a/.agents/skills/dms-plugin-dev/references/widget-plugin-guide.md b/.agents/skills/dms-plugin-dev/references/widget-plugin-guide.md index 05f752c3..c8cea69d 100644 --- a/.agents/skills/dms-plugin-dev/references/widget-plugin-guide.md +++ b/.agents/skills/dms-plugin-dev/references/widget-plugin-guide.md @@ -235,7 +235,7 @@ Conditionally show/hide the bar pill: ```qml PluginComponent { visibilityCommand: "pgrep -x myapp" - visibilityInterval: 5000 // check every 5 seconds + visibilityInterval: 5 // seconds between checks; polling pauses while the bar is hidden } ``` diff --git a/quickshell/Modules/DankBar/DankBarWindow.qml b/quickshell/Modules/DankBar/DankBarWindow.qml index 38aa9474..351762d6 100644 --- a/quickshell/Modules/DankBar/DankBarWindow.qml +++ b/quickshell/Modules/DankBar/DankBarWindow.qml @@ -20,6 +20,8 @@ PanelWindow { property var centerWidgetsModel property var rightWidgetsModel + readonly property bool barRevealed: inputMask.showing + property var controlCenterButtonRef: null property var clockButtonRef: null property var systemUpdateButtonRef: null diff --git a/quickshell/Modules/Plugins/PluginComponent.qml b/quickshell/Modules/Plugins/PluginComponent.qml index 85dd32da..39d9ff68 100644 --- a/quickshell/Modules/Plugins/PluginComponent.qml +++ b/quickshell/Modules/Plugins/PluginComponent.qml @@ -23,6 +23,7 @@ Item { property bool conditionVisible: true property bool _visibilityOverride: false property bool _visibilityOverrideValue: true + readonly property bool _barRevealed: blurBarWindow?.barRevealed ?? true readonly property bool effectiveVisible: { if (_visibilityOverride) @@ -122,6 +123,11 @@ Item { conditionVisible = true; } + on_BarRevealedChanged: { + if (_barRevealed && visibilityCommand && !_visibilityOverride) + checkVisibility(); + } + onVisibilityIntervalChanged: { if (visibilityInterval > 0 && visibilityCommand) { visibilityTimer.restart(); @@ -134,7 +140,7 @@ Item { id: visibilityTimer interval: root.visibilityInterval * 1000 repeat: true - running: root.visibilityInterval > 0 && root.visibilityCommand !== "" + running: root.visibilityInterval > 0 && root.visibilityCommand !== "" && root._barRevealed && !root._visibilityOverride onTriggered: root.checkVisibility() }