diff options
| author | user <user@clank> | 2026-08-14 20:28:30 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-14 20:28:30 +0200 |
| commit | 5cdbca2c8a896fd0e25cfc03aa44ba0143d2d31b (patch) | |
| tree | 1f5bb282eb798164816383eabb8ca39d399ec29c | |
| parent | sl0ppty: halve the padding between the frame's buttons (diff) | |
| download | slosh-5cdbca2c8a896fd0e25cfc03aa44ba0143d2d31b.tar.gz slosh-5cdbca2c8a896fd0e25cfc03aa44ba0143d2d31b.tar.xz slosh-5cdbca2c8a896fd0e25cfc03aa44ba0143d2d31b.zip | |
sl0ppty: plain ASCII for the frame's buttons
_ for minimise, # for zoom, * for the way back, x for close.
Box-drawing and block characters were each tried and each looked unevenly
spaced, which is the answer: the cells are even every time, and what differs is
how much of its own cell a glyph fills. That is a property of the font, not
something to be fixed from here, and single-width ASCII of a similar weight is
the way to stop asking the question.
The measurement stays, so a mark is still yours to change and may be more than
one character. The config note now says what the three attempts established
rather than what I expected each time.
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | config/config.kdl | 19 | ||||
| -rw-r--r-- | src/config.c | 4 | ||||
| -rw-r--r-- | tests/test_zoom.py | 4 |
4 files changed, 16 insertions, 13 deletions
@@ -78,7 +78,7 @@ rewrites its title cannot undo it; clear the name and the pane goes back to the program's title. The name is only the title *text*: the rest of the top border is still the top edge, and still splits upward when clicked. -**Zoom a pane** with `C-a z` or the `□` button in its top-right corner, and it +**Zoom a pane** with `C-a z` or the `#` button in its top-right corner, and it fills the tab until you put it back; the other panes keep running, they are just not drawn. `x` beside it closes the pane. `pane_buttons false` takes both buttons off without touching the keybindings. diff --git a/config/config.kdl b/config/config.kdl index e89a8ac..689c7c9 100644 --- a/config/config.kdl +++ b/config/config.kdl @@ -53,15 +53,18 @@ title_inset 2 // the setting is about the affordance and not the verb. pane_buttons true -// The buttons are evenly spaced whatever is in them, but how even they *look* -// depends on the glyphs: a light character floating in a mostly-empty cell -// donates that space to the gap beside it. Emoji are worse -- many terminals -// draw them two columns wide while chrome here is booked as one -- so avoid -// those. A mark may be more than one character; the button is measured rather -// than assumed, so "[]" and "][" work too if you prefer them. Put the character itself +// Plain single-width ASCII, after box-drawing and block characters were each +// tried and each looked unevenly spaced: the cells are even, but a glyph that +// does not fill its own cell hands that space to the gap beside it, and how +// much it hands over depends on the font. ASCII of a similar weight sidesteps +// the question. Emoji are the worst case -- many terminals draw them two +// columns wide while chrome here is booked as one. +// +// A mark may be more than one character; the button is measured rather than +// assumed, so "[]" and "][" work if you prefer them. Put the character itself // here; this file has no \u escape. -zoom_mark "□" -zoom_on_mark "▣" +zoom_mark "#" +zoom_on_mark "*" close_mark "x" min_mark "_" diff --git a/src/config.c b/src/config.c index 6253f08..7159d47 100644 --- a/src/config.c +++ b/src/config.c @@ -172,8 +172,8 @@ 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->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; diff --git a/tests/test_zoom.py b/tests/test_zoom.py index a5c9fba..285269d 100644 --- a/tests/test_zoom.py +++ b/tests/test_zoom.py @@ -76,7 +76,7 @@ def test_the_button_toggles_and_says_which_way(): s.click(b["x"] + 1, b["y"]) s.settle(20) check("clicking it zooms", len(visible(s)) == 1, str(s.panes())) - check("and the mark says so", "\u25a3" in s.snapshot().line(2), + check("and the mark says so", "*" in s.snapshot().line(2), repr(s.snapshot().line(2)[-14:])) # The button moved: the pane it belongs to just became the whole tab. @@ -85,7 +85,7 @@ def test_the_button_toggles_and_says_which_way(): s.settle(20) check("clicking it again puts it back", len(visible(s)) == 2, str(s.panes())) - check("and the mark goes back too", "\u25a1" in s.snapshot().line(2), + check("and the mark goes back too", "#" in s.snapshot().line(2), repr(s.snapshot().line(2)[-14:])) |
