diff options
| author | user <user@clank> | 2026-08-15 23:35:58 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-15 23:35:58 +0200 |
| commit | dabeb8eb2da8e87c52ad068173bf52204f3b76d6 (patch) | |
| tree | 5cadbd8d91ae5a21946080e030116c4d61f4eb0b /src | |
| parent | sl0ppty: say what the config could not honour (diff) | |
| download | slosh-dabeb8eb2da8e87c52ad068173bf52204f3b76d6.tar.gz slosh-dabeb8eb2da8e87c52ad068173bf52204f3b76d6.tar.xz slosh-dabeb8eb2da8e87c52ad068173bf52204f3b76d6.zip | |
sl0ppty: one family of marks for the frame's buttons
⊟ ⊞ ⊠ away, bigger, gone
⊟ ⊡ ⊠ ...and while it is already filling the tab
`_ # x` said what they did only if you already knew, and `*` for a zoomed
pane was the weakest of the four: nothing about an asterisk says "put it
back". So there are four marks now instead of three and a half, with the
unzoom state getting one of its own.
ASCII was there for a reason, and the reason survives: the cells are
even, but a glyph that does not fill its own cell hands the slack to the
gap beside it, and how much it hands over depends on the font -- which is
why box-drawing and block characters were tried here and looked unevenly
spaced. Four copies of *the same box* answer that better than four
unrelated glyphs did: whatever a font does with the box, it does four
times, and only the interior changes. Minus for away, plus for bigger,
dot for back to normal, times for gone.
Single width, checked in a real frame rather than assumed -- the row
still closes on its corner and each button is still measured rather than
booked, so the hits land where the glyphs are. Not emoji, which many
terminals draw two columns wide while chrome here is booked as one.
Two tests were pinning the old glyphs by hand (`line.rindex("x")` for the
cheatsheet's close button, `"*" in line` for the zoom state). They read
them out of `sl0ppty --dump-config` now, which is generated from the
code: picking a nicer mark later cannot leave a test asserting a glyph
nothing draws.
Diffstat (limited to 'src')
| -rw-r--r-- | src/config.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c index a6c63a9..421a1cd 100644 --- a/src/config.c +++ b/src/config.c @@ -347,10 +347,16 @@ void config_defaults(config_t *c) { c->hints = true; c->version_banner = true; c->pane_buttons = true; - 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, "_"); + /* One family, four interiors: minus, plus, dot, times. The lesson that put + * ASCII here in the first place was about *evenness* -- a glyph that does not + * fill its own cell hands the slack to the gap beside it -- and four copies of + * the same box answer that better than four unrelated glyphs did, while still + * saying which verb is which. Single width, and not emoji: many terminals + * draw those two columns wide while chrome here is booked as one. */ + snprintf(c->zoom_mark, sizeof c->zoom_mark, "\u229e"); /* ⊞ fill the tab */ + snprintf(c->zoom_on_mark, sizeof c->zoom_on_mark, "\u22a1"); /* ⊡ and put it back */ + snprintf(c->close_mark, sizeof c->close_mark, "\u22a0"); /* ⊠ close */ + snprintf(c->min_mark, sizeof c->min_mark, "\u229f"); /* ⊟ into the strip */ snprintf(c->newtab_mark, sizeof c->newtab_mark, "+"); c->bell_indicator = true; snprintf(c->bell_mark, sizeof c->bell_mark, "\u2022"); |
