Make tmux alert parsing and focus more robust

Session names can contain pipes but never colons, so split fields on
colons instead. Remember refreshes that arrive while the indicator is
already polling, and jump to the most recently used tmux client rather
than an arbitrary one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
David Heinemeier HanssonandClaude Fable 5 committed 2026-07-23 17:40:47 -07:00
1 parent a382be2645
commit 5b130c1063
3 files changed
+28 -16

No files matched your search

+8 -1
View File
@@ -8,6 +8,7 @@ BarIndicator {
property int waitingCount: 0
property string tooltip: ""
property bool refreshPending: false
active: waitingCount > 0
activeText: "󰆍"
@@ -16,7 +17,8 @@ BarIndicator {
inactiveTooltipText: "No terminal is waiting"
function refresh() {
if (!statusProc.running) statusProc.running = true
if (statusProc.running) refreshPending = true
else statusProc.running = true
}
function update(raw) {
@@ -54,6 +56,11 @@ BarIndicator {
root.waitingCount = 0
root.tooltip = ""
}
if (root.refreshPending) {
root.refreshPending = false
root.refresh()
}
}
}