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:
co-authored by
Claude Opus 5
parent
49efe2dafa
commit
d2e1587ceb
@@ -49,7 +49,7 @@ BarWidget {
|
||||
|
||||
IpcHandler {
|
||||
target: "omarchy.clock"
|
||||
function refresh(): void { root.refresh() }
|
||||
function refresh(): void { root.broadcast("refresh") }
|
||||
}
|
||||
|
||||
WidgetButton {
|
||||
|
||||
@@ -152,6 +152,8 @@ BarWidget {
|
||||
syncActiveIndicatorModel()
|
||||
}
|
||||
|
||||
function refresh() { root.refreshRequested() }
|
||||
|
||||
onIndicatorEntriesChanged: syncActiveIndicatorOrder()
|
||||
|
||||
implicitWidth: root.vertical
|
||||
@@ -165,7 +167,7 @@ BarWidget {
|
||||
target: "omarchy.indicators"
|
||||
|
||||
function refresh(): void {
|
||||
root.refreshRequested()
|
||||
root.broadcast("refresh")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@ BarWidget {
|
||||
target: "omarchy.system-update"
|
||||
|
||||
function refresh(): void {
|
||||
root.refresh()
|
||||
root.broadcast("refresh")
|
||||
}
|
||||
|
||||
function clear(): void {
|
||||
root.clear()
|
||||
root.broadcast("clear")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user