Refresh bar widgets on every monitor, not just one

A bar surface is built per monitor, so a widget in the layout is live once
per screen — but an IPC target only ever routes to the handler that
registered first. `omarchy.indicators refresh` therefore reached a single
bar, and since indicators only re-read their state on that signal, the
other screens kept showing a stale reminder count, tmux alert, or DND
state until the next reload. Clock and system-update refreshes had the
same reach.

Let the bar resolve every live instance of a widget id and relay the call
to all of them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-07-24 14:16:22 -07:00
co-authored by Claude Opus 5
parent 49efe2dafa
commit d2e1587ceb
6 changed files with 36 additions and 9 deletions
+2 -3
View File
@@ -423,9 +423,8 @@ ShellRoot {
// Bar-widget panels (audio, bluetooth, network, power, monitor, etc.)
// are mounted inside the bar, not via the panel loader below. Route
// summon/hide/toggle to the live bar instance so panel hotkeys survive
// plugin/bar reloads: the bar re-creates the widget, while a fixed
// IpcHandler target would go stale ("first handler wins" leaves a
// destroyed instance's handler active and the new one rejected).
// plugin/bar reloads: the bar re-creates the widget, while a fixed IPC
// target only ever routes to one of the per-monitor instances.
function isBarWidgetPanelPlugin(pluginId) {
var plugins = shell.pluginRegistry.installedPlugins
var m = plugins[String(pluginId || "")]