diff options
| author | user <user@clank> | 2026-09-22 15:38:08 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-09-22 15:38:08 +0200 |
| commit | 1cbfb4474ca31c61254be8d5f3ec046967bd1ff3 (patch) | |
| tree | 3e8184674e330ce24ebef23dd13594fa38f45fa2 /src | |
| parent | sidebar: room for the spinner, by default (tab_bar_padding 0 1 0 2) (diff) | |
| download | slosh-1cbfb4474ca31c61254be8d5f3ec046967bd1ff3.tar.gz slosh-1cbfb4474ca31c61254be8d5f3ec046967bd1ff3.tar.xz slosh-1cbfb4474ca31c61254be8d5f3ec046967bd1ff3.zip | |
theme: the busy spinner is its own colour (tab_status_spinner)
It was drawn in tab_status_busy, the colour of the words it sits beside, which
made one decision out of two. The words have to stay readable at a glance and
a mark does not: a theme may well want the glyph loud and the text calm -- or
the text in the accent and the mark a quiet dot -- and with one entry neither
is available without moving both.
Unset it follows tab_status_busy, derived after it and from whatever that
resolved to, named or derived, so nothing changes for anyone who does not ask
and no theme in contrib needs a line. `--dump-theme` writes both, like every
other colour the compositor draws.
Diffstat (limited to 'src')
| -rw-r--r-- | src/app_draw.c | 4 | ||||
| -rw-r--r-- | src/config.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/app_draw.c b/src/app_draw.c index 5676240..b3d8f07 100644 --- a/src/app_draw.c +++ b/src/app_draw.c @@ -2469,8 +2469,8 @@ void draw_tab_sidebar(app_t *a, screen_t *s) { * one column they stand shoulder to shoulder, which is the squashed * look and now something you ask for rather than something you get. */ if (marked && k == 0) - screen_text(s, cx, y, spin, hot ? TAB_HOVER : TAB_STATUS_BUSY, band, - 0); + screen_text(s, cx, y, spin, hot ? TAB_HOVER : TAB_STATUS_SPINNER, + band, 0); char act[24]; snprintf(act, sizeof act, "find:%u", ts.row[j].pane); hit_add(&s->hits, cx, y, cw, 1, act); diff --git a/src/config.c b/src/config.c index 012964e..60eb711 100644 --- a/src/config.c +++ b/src/config.c @@ -697,6 +697,7 @@ static const struct { {"tab_status_fg", offsetof(config_t, tab_status_fg)}, {"tab_status_bg", offsetof(config_t, tab_status_bg)}, {"tab_status_busy", offsetof(config_t, tab_status_busy)}, + {"tab_status_spinner", offsetof(config_t, tab_status_spinner)}, {"tab_status_stripe", offsetof(config_t, tab_status_stripe)}, {"status", offsetof(config_t, status)}, {"status_state", offsetof(config_t, status_state)}, @@ -1143,6 +1144,7 @@ void config_defaults(config_t *c) { * annotations that is still moving, and the spinner beside it is already * saying so -- the colour is what makes it findable without looking. */ c->tab_status_busy = accent; + c->tab_status_spinner = accent; /* Barely off the background: the stripe has to say "different pane", not * "selected". Only drawn when statuses can wrap -- see tab_bar_status_lines * -- so an unwrapped sidebar keeps its transparent rows. */ @@ -2967,6 +2969,10 @@ static bool load_into(config_t *c, const char *path, int depth, char *err, /* The busy one is the theme's own accent, which is what it uses for * "this one" everywhere else. */ if (!kdl_child(theme, "tab_status_busy")) c->tab_status_busy = c->tab_hover; + /* After it, and from it: the mark follows the words it marks unless a + * theme says otherwise, whether those words were named or derived. */ + if (!kdl_child(theme, "tab_status_spinner")) + c->tab_status_spinner = c->tab_status_busy; } /* After the theme, so the wash follows whatever scroll_bg the theme just * chose -- a config that wrote its own `scrolled` chain keeps it, whether |
