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 <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-07-07 09:18:03 -07:00
co-authored by Claude Fable 5
parent e1cdc9005e
commit c4b1e33669
2 changed files with 15 additions and 1 deletions
@@ -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