From c4b1e336698fc82116a683f09ca2babc072b06c9 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 7 Jul 2026 09:18:03 -0700 Subject: [PATCH] Route the weather toggle through the shell target too Weather wraps its panel in a BarWidget that only exposed togglePanel(), so it couldn't ride the new shell-routed hotkey path and was left on the stale-prone per-plugin target. Expose open/close/opened on the wrapper (open maps to the panel's hotkey path so the center hover reveal stays suppressed) and switch omarchy-notification-weather to the new syntax. Co-Authored-By: Claude Fable 5 --- bin/omarchy-notification-weather | 2 +- shell/plugins/panels/weather/BarWidget.qml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-notification-weather b/bin/omarchy-notification-weather index e4eaa349..d7991df5 100755 --- a/bin/omarchy-notification-weather +++ b/bin/omarchy-notification-weather @@ -2,4 +2,4 @@ # omarchy:summary=Toggle the current weather panel -omarchy-shell omarchy.weather toggle +omarchy-shell shell toggle omarchy.weather diff --git a/shell/plugins/panels/weather/BarWidget.qml b/shell/plugins/panels/weather/BarWidget.qml index c50b739c..fdaf78bd 100644 --- a/shell/plugins/panels/weather/BarWidget.qml +++ b/shell/plugins/panels/weather/BarWidget.qml @@ -22,6 +22,20 @@ BarWidget { if (panelLoader.item && panelLoader.item.toggle) panelLoader.item.toggle() } + // Shape contract for shell.summon/hide/toggle routing (Bar.findPanelWidget + // requires open/close/opened on the bar-widget root). Open maps to the + // panel's hotkey path so summoning suppresses the center hover reveal, + // matching what the old per-plugin IpcHandler did. + readonly property bool opened: panelLoader.item ? panelLoader.item.opened === true : false + + function open() { + if (panelLoader.item && panelLoader.item.openFromHotkey) panelLoader.item.openFromHotkey() + } + + function close() { + if (panelLoader.item && panelLoader.item.close) panelLoader.item.close() + } + visible: panelLoader.item && panelLoader.item.label !== "" implicitWidth: bar && bar.vertical ? button.implicitWidth : button.implicitWidth + Style.spacing.labelGap implicitHeight: button.implicitHeight