aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.h
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-14 19:14:29 +0200
committeruser <user@clank>2026-08-14 19:14:29 +0200
commite75eecfc64adbf5fae0f4ddc3eca1dae41028fa2 (patch)
tree21b114e4b5a517b9762e25a3057504b69c9e38c8 /src/config.h
parentsl0ppty: give the scroll arrow room to breathe (diff)
downloadslosh-e75eecfc64adbf5fae0f4ddc3eca1dae41028fa2.tar.gz
slosh-e75eecfc64adbf5fae0f4ddc3eca1dae41028fa2.tar.xz
slosh-e75eecfc64adbf5fae0f4ddc3eca1dae41028fa2.zip
sl0ppty: one theme name per decision, and a tab you can see
The count, since it was asked: no hardcoded colours at all in the drawing code. Every colour already came from the config. The problem was the other way round — six names were serving about thirty decisions, so the names were the thing that was hardcoded. frame_focus was the focused frame *and* the split guide *and* the resize handle *and* the tab hover *and* a collapsed row under the pointer. Recolouring one recoloured five. There are thirty-five entries now, one per surface, each documented in config.kdl by being its own default. Several still share a value: that is a statement that they look right together, not that they are the same thing, and the difference only matters the first time someone wants to change one of them. The tab you are in is filled rather than merely bold, which was the ask. Bold alone is easy to miss on a strip of short labels, and it was the only thing distinguishing the tab you were in from the four you were not. That immediately raised a question the old scheme could not ask: what does hovering the active tab look like, when it already has the strongest treatment on the strip? Keeping its fill and brightening its text, because it is still the tab you are in and clicking it does nothing. My first version gave it no hover at all, which reads as the hover being broken rather than as the click being pointless. Three surfaces were still borrowing a name that did not describe them: the in-place rename editor was wearing the button colours, a pane's OSC status text and a suspended pane's hint were wearing the frame's. They have their own now.
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h47
1 files changed, 45 insertions, 2 deletions
diff --git a/src/config.h b/src/config.h
index 9d0b022..869eeaf 100644
--- a/src/config.h
+++ b/src/config.h
@@ -125,10 +125,53 @@ typedef struct {
* terminal exactly as before. */
color_t default_fg, default_bg;
- /* theme */
- color_t frame_focus, frame_idle, title_focus;
+ /* theme
+ *
+ * One name per decision. These began as six names doing thirty jobs, which
+ * meant the split guide could not be recoloured without also recolouring the
+ * focused frame, because they were the same entry. Several still share a
+ * default — that is a statement about what looks right together, not about
+ * them being the same thing. */
+
+ /* panes */
+ color_t frame_focus, frame_idle;
+ color_t title_focus, title_idle;
+
+ /* things you can press: the pane's own OSC 5577 buttons */
color_t button_fg, button_bg, button_bg_idle;
+ /* affordances that appear under the pointer */
+ color_t guide; /* the split guide: armed edge and dashed boundary */
+ color_t resize; /* the handle in the gap between two panes */
+ color_t drop_target; /* the frame of a pane a drag could land on */
+
+ /* the scrollback indicator in a pane's frame */
+ color_t scroll_fg, scroll_bg;
+
+ /* rows of a tab that has collapsed into a list */
+ color_t header, header_hover, header_hover_title;
+
+ /* the strip along the top */
+ color_t tab_active_fg, tab_active_bg;
+ /* The active tab keeps its fill while the pointer is on it -- it is still
+ * the tab you are in -- so its hover shows in the text instead. */
+ color_t tab_active_hover_fg;
+ 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 line along the bottom */
+ color_t status, status_state;
+
+ /* the pane finder */
+ color_t finder_fg, finder_bg, finder_sel_fg, finder_sel_bg;
+
+ /* the in-place editor a double-click opens on a pane's title */
+ color_t rename_fg, rename_bg;
+
+ /* announcements */
+ color_t toast_fg, toast_bg;
+
/* keys */
int prefix_key;
uint16_t prefix_mods;