aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.c
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-14 20:18:23 +0200
committeruser <user@clank>2026-08-14 20:18:23 +0200
commit373931bf85fa92bc326f2ab68edf14a5bc15b260 (patch)
tree61399ade7c707800c86ef1c02ba72123fc2c3be6 /src/config.c
parentsl0ppty: pick a minimise mark that fills its cell (diff)
downloadslosh-373931bf85fa92bc326f2ab68edf14a5bc15b260.tar.gz
slosh-373931bf85fa92bc326f2ab68edf14a5bc15b260.tar.xz
slosh-373931bf85fa92bc326f2ab68edf14a5bc15b260.zip
sl0ppty: minimised panes get one row between them, and ASCII marks
The strip was a row per minimised pane, which let putting things away cost more room than leaving them out. It is one row now, shaped like the tab strip and for the same reason: a list of names you click to go somewhere. Three panes put away leave the survivor exactly as tall as one did, and there is a test that says so, because that is the whole change. The panes on it are no longer laid out at all — the bar draws them, so they have no rect. The row the bar occupies is worked out by the layout and stored, rather than by the drawing working it out again from the same inputs; two copies of that sum is how a click lands somewhere the eye did not. The frame's marks are plain ASCII now. Spacing has been reported twice and the cells were even both times: what is uneven is the glyphs. A light character floating in a mostly empty cell hands that space to the gap beside it, and the fix of picking heavier glyphs only holds for fonts I can see. ASCII has neither that problem nor the double-width one, and "[]" and "][" say maximise and restore about as clearly as anything. That needed the button width measured rather than assumed. It was hardcoded to three cells, which was fine while every mark was one character and silently wrong the moment one was two: the mark would have been drawn over its neighbour, and the neighbour's hit would have covered a cell it did not draw. Also fixes a case that could not happen with a row each: when there is no room for the bar at all, the tab flattens rather than leaving minimised panes with no rect and nobody drawing them.
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c
index f6c9e5f..7dd12b7 100644
--- a/src/config.c
+++ b/src/config.c
@@ -172,10 +172,10 @@ void config_defaults(config_t *c) {
c->title_align = ALIGN_CENTER;
c->title_inset = 2;
c->pane_buttons = true;
- snprintf(c->zoom_mark, sizeof c->zoom_mark, "\u25a1");
- snprintf(c->zoom_on_mark, sizeof c->zoom_on_mark, "\u25a3");
- snprintf(c->close_mark, sizeof c->close_mark, "\u00d7");
- snprintf(c->min_mark, sizeof c->min_mark, "\u2581");
+ snprintf(c->zoom_mark, sizeof c->zoom_mark, "[]");
+ snprintf(c->zoom_on_mark, sizeof c->zoom_on_mark, "][");
+ snprintf(c->close_mark, sizeof c->close_mark, "x");
+ snprintf(c->min_mark, sizeof c->min_mark, "_");
c->bell_indicator = true;
snprintf(c->bell_mark, sizeof c->bell_mark, "\u2022");
c->min_pane_cols = 24;
@@ -256,6 +256,8 @@ void config_defaults(config_t *c) {
c->finder_sel_bg = accent;
c->bell = accent;
+ c->minbar = dim;
+ c->minbar_hover = accent;
c->pane_button = dim;
c->pane_button_hover = accent;
@@ -480,6 +482,8 @@ bool config_load(config_t *c, const char *path, char *err, size_t errcap) {
{"finder_sel_fg", &c->finder_sel_fg},
{"finder_sel_bg", &c->finder_sel_bg},
{"bell", &c->bell},
+ {"minbar", &c->minbar},
+ {"minbar_hover", &c->minbar_hover},
{"pane_button", &c->pane_button},
{"pane_button_hover", &c->pane_button_hover},
{"rename_fg", &c->rename_fg},