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.c | |
| 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.c')
| -rw-r--r-- | src/config.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 11585d7..22d6665 100644 --- a/src/config.c +++ b/src/config.c @@ -169,6 +169,8 @@ void config_defaults(config_t *c) { c->rounded = true; c->title_align = ALIGN_CENTER; c->title_inset = 2; + c->bell_indicator = true; + snprintf(c->bell_mark, sizeof c->bell_mark, "\u2022"); c->min_pane_cols = 24; c->min_pane_rows = 6; c->min_split_cols = 32; @@ -246,6 +248,8 @@ void config_defaults(config_t *c) { c->finder_sel_fg = ink; c->finder_sel_bg = accent; + c->bell = accent; + c->rename_fg = ink; c->rename_bg = accent; @@ -358,6 +362,10 @@ bool config_load(config_t *c, const char *path, char *err, size_t errcap) { c->title_inset = (uint16_t)kdl_arg_int(kdl_child(root, "title_inset"), 0, c->title_inset); + c->bell_indicator = + kdl_arg_bool(kdl_child(root, "bell_indicator"), 0, c->bell_indicator); + const char *bm = kdl_arg(kdl_child(root, "bell_mark"), 0, NULL); + if (bm) snprintf(c->bell_mark, sizeof c->bell_mark, "%s", bm); const kdl_node_t *mins = kdl_child(root, "min_split"); if (mins) { @@ -450,6 +458,7 @@ bool config_load(config_t *c, const char *path, char *err, size_t errcap) { {"finder_bg", &c->finder_bg}, {"finder_sel_fg", &c->finder_sel_fg}, {"finder_sel_bg", &c->finder_sel_bg}, + {"bell", &c->bell}, {"rename_fg", &c->rename_fg}, {"rename_bg", &c->rename_bg}, {"toast_fg", &c->toast_fg}, |
