diff options
| author | Peter Geissler <peter@haxx.in> | 2026-09-20 19:40:05 +0200 |
|---|---|---|
| committer | Peter Geissler <peter@haxx.in> | 2026-09-20 19:40:05 +0200 |
| commit | 6c8d99cd71858955c0e9c9d93d738c855e652ce8 (patch) | |
| tree | a02b83f33773df0119a669ba697dfeefe3971a29 /include | |
| parent | tests: a pane's status is output, so write the pty, not the input decoder (diff) | |
| download | slosh-6c8d99cd71858955c0e9c9d93d738c855e652ce8.tar.gz slosh-6c8d99cd71858955c0e9c9d93d738c855e652ce8.tar.xz slosh-6c8d99cd71858955c0e9c9d93d738c855e652ce8.zip | |
tabs: air before the new-tab button, and the option to do without it
The `+` is the one entry in the strip that does not mean "go here", and it
sits at the end of a list where every other entry does. Flush against them it
is what you hit when you meant the last tab -- most easily in a sidebar, where
the target is the full width of the row and the pointer only has to be one row
low. newtab_pad is the nothing in between: blank rows in a sidebar, blank
columns on top, one by default, which is enough to make the slip a miss.
It is paint rather than layout, like tab_bar_pad: the panes' rectangle is the
same at 0 as at 5, so tuning it repaints without reflowing anyone. And it is
given up before the button is -- a strip short of room drops the spacing one
cell at a time and still draws what the spacing was protecting, because
spacing must never cost you the thing it spaces.
newtab_button false removes the button outright, for people who make tabs from
the keyboard and would rather have the row (or the columns) back. Only the
place to click it goes: the chord and the palette entry still work. Setting
newtab_mark "" already did this by omission; this says it on purpose, and says
it in --dump-config.
Diffstat (limited to 'include')
| -rw-r--r-- | include/config.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index f7caeba..0f9d37e 100644 --- a/include/config.h +++ b/include/config.h @@ -192,6 +192,19 @@ typedef struct { /* The new-tab button at the end of the strip. Drawn with a space each side, * so a one-character mark is still a three-cell target. */ char newtab_mark[32]; + /* Whether that button is drawn at all. On by default -- it is the only + * pointer-reachable way to make a tab -- but the verb is also a chord and a + * palette entry, so anyone who works from the keyboard can have the row (or + * the columns) back and stop hitting it by accident. Setting newtab_mark to + * "" does the same thing by omission; this says it on purpose. */ + bool newtab_button; + /* Air between the last tab and that button: blank *rows* in a sidebar, + * blank *columns* in the top strip -- the axis the list runs along, either + * way. The button sits at the end of a list of tabs whose rows all do + * something else, and a destructive-enough neighbour one cell away is a + * misclick waiting to happen; one cell of nothing is the cheapest fix. + * Dropped rather than the button itself when the strip is out of room. */ + uint16_t newtab_pad; bool bell_indicator; /* What to draw. A short string rather than a fixed glyph: the obvious * choice is an emoji bell, and emoji are drawn two columns wide by many |
