diff options
| author | user <user@clank> | 2026-08-14 20:32:16 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-14 20:32:16 +0200 |
| commit | 686421cee2ebf7dac0d4da28cfa23fe201272352 (patch) | |
| tree | bb3c46b23a378323c33845fa532300f135d5d1de /src/config.h | |
| parent | sl0ppty: plain ASCII for the frame's buttons (diff) | |
| download | slosh-686421cee2ebf7dac0d4da28cfa23fe201272352.tar.gz slosh-686421cee2ebf7dac0d4da28cfa23fe201272352.tar.xz slosh-686421cee2ebf7dac0d4da28cfa23fe201272352.zip | |
sl0ppty: the status line says what the pointer is on
The frame's affordances are nearly all one character wide, and the widest one
is invisible: a border that splits when you click it looks exactly like a
border. Hovering anything now puts a word in the middle of the status line.
Read off the hit list rather than tracked. Anything that registers a hit gets a
hint by being named in one table, and nothing has to remember to raise or clear
one — which also means the hint cannot disagree about what is under the pointer
with the thing that would actually be clicked, since both are the same lookup.
The status line is drawn after everything else has registered, so the list is
complete by the time it asks.
It is centred in what is left between the two ends rather than in the row.
Centring it in the row would put it under the session name on a narrow screen,
and a hint that overwrites the thing it is explaining is worse than no hint; it
is simply not drawn when it does not fit, which has a test with a deliberately
long pane title.
Two of that test's checks were wrong before they were right, in the ordinary
way: one searched for a substring that also occurs in the text on the right,
and one assumed forty-four columns was too narrow to fit a hint when it was
not. Both now assert against measured positions rather than my guess at them.
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 28350ce..76a9b85 100644 --- a/src/config.h +++ b/src/config.h @@ -84,6 +84,10 @@ typedef struct { * since. Off makes a bell silent *and* invisible, which is a real choice. */ /* Buttons in the top-right of a pane's frame: zoom, and close. Off leaves * the keyboard bindings alone; it is about the affordance, not the verb. */ + /* A word in the middle of the status line for whatever the pointer is on. + * Discoverability for a frame whose affordances are mostly one character + * wide; off if you already know them. */ + bool hints; bool pane_buttons; /* Marks of similar visual weight, so the even spacing between the buttons * reads as even: a glyph that floats in a mostly-empty cell donates its own @@ -196,6 +200,9 @@ typedef struct { /* the row of minimised panes along the bottom */ color_t minbar, minbar_hover; + /* the hint in the middle of the status line */ + color_t hint; + /* announcements */ color_t toast_fg, toast_bg; |
