aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.c
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-25 14:23:33 +0200
committeruser <user@clank>2026-08-25 14:23:33 +0200
commitb744a90859bf248bfbea97f990668301b5fa9537 (patch)
treef1b717507bc24161b7ab41def644289f9457470e /src/config.c
parentplaceholder webbie (diff)
downloadslosh-b744a90859bf248bfbea97f990668301b5fa9537.tar.gz
slosh-b744a90859bf248bfbea97f990668301b5fa9537.tar.xz
slosh-b744a90859bf248bfbea97f990668301b5fa9537.zip
compact: shared borders instead of gaps (D23)
One knob, `compact true`: panes pack flush against 1-cell divider lines that meet in real junctions, one frame rings the tab, and a pane's title rides the line above it -- a boundary costs one cell where the default look spends four. The lines are strokes: each write says which edges of its cell it needs, unions with what is there, and never clobbers text, so ├ ┬ ┼ fall out of paint order and the focus ring recolours without inventing arms. The divider *is* the gap (eff_gap, one answer for the layout, split_fits and the resize clamp), so gap hits, hover hints and corner drags work unchanged. Interior edges give up click-to-split -- one cell cannot hold two verbs -- and a pane's status row overlays its last content row. Floats, zoom and the D6 flatten keep classic frames through place_hidden: zero new tree cases. Underneath it, mode or no mode: a border drag now moves the boundary on that side, converted on the first motion so the press that never moves keeps its old meaning -- the handle's click still splits, the rim's is still deliberately nothing (drag.rim). Which is also the fix for gap 0, where flush panes leave no gap cell to grab and the resize gesture had silently vanished with it.
Diffstat (limited to '')
-rw-r--r--src/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index a306314..5d9d688 100644
--- a/src/config.c
+++ b/src/config.c
@@ -829,6 +829,7 @@ void config_defaults(config_t *c) {
c->gap = 1;
c->gap_aspect = 2;
c->pad_top = c->pad_right = c->pad_bottom = c->pad_left = 0;
+ c->compact = false;
c->rounded = true;
c->title_align = ALIGN_CENTER;
c->title_inset = 2;
@@ -1558,6 +1559,8 @@ char *config_render(const config_t *c) {
cb_add(&b, "padding %u %u %u %u // top right bottom left\n", c->pad_top,
c->pad_right, c->pad_bottom, c->pad_left);
cb_add(&b, "rounded %s\n", yesno(c->rounded));
+ cb_add(&b, "compact %s // shared 1-cell borders instead of gaps\n",
+ yesno(c->compact));
cb_add(&b, "title_align \"%s\"\n",
c->title_align == ALIGN_LEFT ? "left"
: c->title_align == ALIGN_RIGHT ? "right"
@@ -1827,6 +1830,7 @@ static const char *const KNOWN_TOP[] = {
"bell_indicator",
"bell_mark",
"close_mark",
+ "compact",
"dim_unfocused",
"double_click_ms",
"word_separators",
@@ -2060,6 +2064,7 @@ static bool load_into(config_t *c, const char *path, int depth, char *err,
}
}
c->rounded = kdl_arg_bool(kdl_child(root, "rounded"), 0, c->rounded);
+ c->compact = kdl_arg_bool(kdl_child(root, "compact"), 0, c->compact);
c->status_bar = kdl_arg_bool(kdl_child(root, "status_bar"), 0, c->status_bar);
c->status_line =
kdl_arg_bool(kdl_child(root, "status_line"), 0, c->status_line);