diff options
| author | user <user@clank> | 2026-08-14 19:20:25 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-14 19:20:25 +0200 |
| commit | 0de9bbc8ea84f8ad766abbf602e603fd90bd2a66 (patch) | |
| tree | e56992e66052a2c196709e6aa755fa3d092f5828 /src/config.h | |
| parent | sl0ppty: one theme name per decision, and a tab you can see (diff) | |
| download | slosh-0de9bbc8ea84f8ad766abbf602e603fd90bd2a66.tar.gz slosh-0de9bbc8ea84f8ad766abbf602e603fd90bd2a66.tar.xz slosh-0de9bbc8ea84f8ad766abbf602e603fd90bd2a66.zip | |
sl0ppty: a pane that rings says so
libghostty-vt already had a BEL effect; nothing was listening. A pane now marks
its titlebar when one arrives, and stays marked until the pane is looked at.
It marks the *tab* as well, which is the half that makes it useful. A bell
exists for the pane you are not watching, and a mark that only appeared on
screen would be missing precisely when the pane is in a background tab — which
is where an agent finishing a job, or a build wanting input, actually happens.
Looking at a pane is the acknowledgement, and it is done once per frame before
anything is drawn rather than while the pane itself is painted. The tab strip is
drawn first, so clearing during the pane's own paint left the strip reporting a
bell that had already been answered for one frame — visible as a stale dot that
went away on the next unrelated repaint. Doing it up front also means every
route to "this pane is focused" clears it, not only the routes that thought to.
The mark is a configurable string rather than a fixed glyph. The obvious choice
is an emoji bell, emoji are drawn two columns wide by many terminals, and
screen_text books every chrome cell as one — so the default is a narrow bullet
and anyone who knows their own terminal can say otherwise. config.kdl has no \\u
escape, so it holds the character itself; that cost a round trip to notice.
bell_indicator false makes a bell silent and invisible, which is a real choice
and not an oversight, so it is spelled out in the config.
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 869eeaf..cf3ed08 100644 --- a/src/config.h +++ b/src/config.h @@ -78,6 +78,14 @@ typedef struct { * always carries a space on each side on top of this, so a title can never * end up welded to the rule beside it. */ uint16_t title_inset; + /* Mark a pane's titlebar when a BEL arrives there and nobody has looked + * since. Off makes a bell silent *and* invisible, which is a real choice. */ + bool bell_indicator; + /* What to draw. A short string rather than a fixed glyph: the obvious + * choice is an emoji bell, and emoji are drawn two columns wide by many + * terminals while chrome here is booked as one — so the default is narrow + * and anyone who knows their terminal can say otherwise. */ + char bell_mark[16]; uint16_t min_pane_cols, min_pane_rows; /* The smallest pane a split is allowed to *produce*. min_pane is the point * below which the layout gives up and collapses a pane; this is the point @@ -169,6 +177,9 @@ typedef struct { /* the in-place editor a double-click opens on a pane's title */ color_t rename_fg, rename_bg; + /* the bell mark in a pane's titlebar */ + color_t bell; + /* announcements */ color_t toast_fg, toast_bg; |
