diff options
| author | user <user@clank> | 2026-09-10 15:41:16 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-09-10 15:41:16 +0200 |
| commit | 881c9b4a5c7352daf4861bff5902936e9746f9f5 (patch) | |
| tree | d57b4eb8ceaf3675236c2c31924eb89d900d8dc7 /src/config.c | |
| parent | tabs: the strip can stand on its side (tab_bar_side left/right) (diff) | |
| download | slosh-881c9b4a5c7352daf4861bff5902936e9746f9f5.tar.gz slosh-881c9b4a5c7352daf4861bff5902936e9746f9f5.tar.xz slosh-881c9b4a5c7352daf4861bff5902936e9746f9f5.zip | |
sidebar: a row of air on top (tab_bar_pad), indicators under the labels' inset
One blank row above the first tab by default: a list starting in the
very corner reads as cramped, and in compact mode the row lines the
first tab up with the pane content inside the ring rather than with the
ring's top line. The pad is where the drawing starts, not a layout fact
-- the panes' rect is identical at pad 0 and pad 5, so tuning it
repaints without reflowing anyone.
The bottom indicators (pane count, prefix badge) move in one cell to
sit under the labels' own leading space; flush at the edge column they
read as misaligned on the left and collide with the compact ring's
corner on the right.
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 31ca0e1..d800696 100644 --- a/src/config.c +++ b/src/config.c @@ -923,6 +923,10 @@ void config_defaults(config_t *c) { /* Wide enough for " 12:a-real-name " plus a bell; narrow enough that a * 100-column terminal keeps a working layout beside it. */ c->tab_bar_width = 18; + /* One row of air by default: a list that starts in the very corner reads + * as cramped, and in compact mode the row lines the first tab up with the + * pane content inside the ring rather than with the ring's top line. */ + c->tab_bar_pad = 1; c->status_line = true; /* Deliberately wider than the panes' own margin (gap * gap_aspect = 2), so * the strip and the line read as chrome sitting outside the layout rather @@ -1625,6 +1629,8 @@ char *config_render(const config_t *c) { : "top"); cb_add(&b, "tab_bar_width %u // columns a sidebar takes\n", c->tab_bar_width); + cb_add(&b, "tab_bar_pad %u // blank rows above a sidebar's tabs\n", + c->tab_bar_pad); cb_add(&b, "status_line %s // the line along the bottom\n", yesno(c->status_line)); cb_add(&b, "status_pad %u\n", c->status_pad); @@ -1933,6 +1939,7 @@ static const char *const KNOWN_TOP[] = { "status_bar", "status_line", "status_pad", + "tab_bar_pad", "tab_bar_side", "tab_bar_width", "theme", @@ -2145,6 +2152,8 @@ static bool load_into(config_t *c, const char *path, int depth, char *err, } c->tab_bar_width = (uint16_t)kdl_arg_int(kdl_child(root, "tab_bar_width"), 0, c->tab_bar_width); + c->tab_bar_pad = + (uint16_t)kdl_arg_int(kdl_child(root, "tab_bar_pad"), 0, c->tab_bar_pad); c->status_line = kdl_arg_bool(kdl_child(root, "status_line"), 0, c->status_line); c->status_pad = |
