Skip to content

Surface terminal bells on tabs, with a font-free indicator - #1922

Open
raphamorim wants to merge 17 commits into
mainfrom
bell-tab-indicator-v2
Open

raphamorim wants to merge 17 commits into
mainfrom
bell-tab-indicator-v2

Conversation

@raphamorim

@raphamorim raphamorim commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Supersedes #1881. Carries @aymanbagabas's three commits verbatim (bell tab indicator, immediate tab titles, BEL parser test), with review fixes layered on top.

A BEL from a background tab now flags its tab in the strip, and OSC 0/2 title changes reach the tab strip immediately as events. See #1881 for the full design write-up. Gated behind bell.tab-indicator (default true).

Titles are now purely event-driven: the standing 2s poll is gone and title rendering never inspects the foreground process. {{ title }} comes from OSC 0/2 events, the path variables come from OSC 7 events (empty for shells without that integration), {{ program }} is the name of the command the pane spawned, and {{ columns }}/{{ lines }} re-render on resize. An idle terminal does zero title work and no timer ever wakes the process.

aymanbagabas and others added 7 commits September 6, 2026 17:11
RioEvent::Bell now carries the ringing pane's route_id, so the tab strip
can flag the tab it came from with a bell glyph. The mark is set only for
background tabs and cleared on the next frame the tab is focused.

Gated behind bell.tab-indicator (default true).

Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Tab titles were only recomputed by a 2s poll, itself gated behind a
second 2s throttle, so an OSC 0/2 title change could take seconds to
reach the tab strip even though the PTY had already reported it.

RioEvent::Title now carries the route id of the pane that changed, so
the tab title is recomputed on arrival. The poll stays for the variables
no event announces ({{program}}, paths) and now repaints when it finds a
change; both paths mark the frame dirty, since the tab strip is chrome
and a bare redraw request is dropped by the present gate.

The title template regex is compiled once now that it renders per event
rather than per tick.

Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Drives a real 0x07 byte through the processor so the C0 dispatch and the
route id the event carries stay covered, not just the handler call.

Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Comment thread rio-backend/src/config/bell.rs Outdated
pub struct Bell {
#[serde(default = "default_audio_bell")]
pub audio: bool,
/// Mark background tabs that rang the bell with a 🔔 in the tab strip.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants