aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-10 16:32:10 +0200
committeruser <user@clank>2026-09-10 16:32:10 +0200
commita2d08f4876226446c0052f033e8afea2f2ffbbf1 (patch)
treeac77189b9c928939202adca4a43298730bccd8d2 /include
parentsidebar: the new-tab button says what it is, given a row to say it on (diff)
downloadslosh-a2d08f4876226446c0052f033e8afea2f2ffbbf1.tar.gz
slosh-a2d08f4876226446c0052f033e8afea2f2ffbbf1.tar.xz
slosh-a2d08f4876226446c0052f033e8afea2f2ffbbf1.zip
sidebar: statuses wear italic instead of an indent, and can wear colour
Three columns of indent is a fifth of a sixteen-column sidebar, spent saying 'this belongs to the row above'. The slant says it in none: a status now starts in the same column its tab's name starts in, and is set in italic. That also survives the monochrome themes in contrib, where a colour-only distinction would have had nothing to spend. tab_status_fg / tab_status_bg are there for themes that do have colour to spend. The fg follows tab_count when a theme does not name it -- the same declared/derived split apply_scrolled makes -- so the six themes in contrib get coherent status rows without a line added to any of them. The bg is unset by default, because a band is opt-in and 'none' is what a translucent terminal wants; the row is padded so a band that *is* set covers the row rather than the words on it. Two things fell out. The padding loop existed three times and is now pad_cells. And cb_color wrote #000000 for an unset colour, so quietly pinned attach_bg -- 'gray ink on the terminal's own background', says its comment -- to a black band. Unset colours are now written commented out, the same trick the states block uses for what it wants re-derived rather than pinned.
Diffstat (limited to 'include')
-rw-r--r--include/app_internal.h2
-rw-r--r--include/config.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/include/app_internal.h b/include/app_internal.h
index 11f96b4..94a92cf 100644
--- a/include/app_internal.h
+++ b/include/app_internal.h
@@ -392,6 +392,8 @@ extern config_t CFG;
#define PREFIX_FG (CFG.prefix_fg)
#define PREFIX_BG (CFG.prefix_bg)
#define TAB_COUNT (CFG.tab_count)
+#define TAB_STATUS_FG (CFG.tab_status_fg)
+#define TAB_STATUS_BG (CFG.tab_status_bg)
#define STATUS_C (CFG.status)
#define STATUS_STATE (CFG.status_state)
#define FINDER_FG (CFG.finder_fg)
diff --git a/include/config.h b/include/config.h
index 1849014..f7caeba 100644
--- a/include/config.h
+++ b/include/config.h
@@ -438,6 +438,12 @@ typedef struct {
color_t tab_idle, tab_hover;
color_t prefix_fg, prefix_bg; /* the "C-a" badge */
color_t tab_count; /* how many panes in the session */
+ /* The sidebar's status rows. Their distinction from the labels above them
+ * is carried by the slant (see draw_tab_sidebar), because a monochrome
+ * theme has no colour to spend on it; these are for themes that do. A bg of
+ * none leaves the terminal's own background alone, which is what a
+ * translucent one wants. */
+ color_t tab_status_fg, tab_status_bg;
/* the line along the bottom */
color_t status, status_state;