aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-12 16:15:19 +0200
committeruser <user@clank>2026-08-12 16:15:19 +0200
commitc3764fca00c1d91c06612a33162b2354e9d42be0 (patch)
tree38e7f519c7a7c725a638b84f5741659a172a3a28 /README.md
parentsl0p: highlight the status bar button under the pointer (diff)
downloadsl0ppij-c3764fca00c1d91c06612a33162b2354e9d42be0.tar.gz
sl0ppij-c3764fca00c1d91c06612a33162b2354e9d42be0.tar.xz
sl0ppij-c3764fca00c1d91c06612a33162b2354e9d42be0.zip
sl0p: add an indexed style for status bar buttons
`status_bar_button_style "indexed"` renders `1:Approve 2:Reject` instead of `[Approve] [Reject]`, so the bar doubles as a key legend for a harness that binds alt+1..9 to the same actions. A config option rather than a protocol field: whether the numbers mean anything depends on what the USER has bound, not on what the program knows. It needs no wire change and so no version bump, and the click report still carries the id -- never the index -- so a program is unaffected by which style is in force. The style is threaded into layout_status_bar, the one function the renderer draws from and the hit-test resolves against. That is what makes this safe: changing a button's rendered width necessarily changes its clickable span too, verified by a test asserting span width equals the drawn width and that every drawn column resolves back, for both styles. Also fixes the web client's Style construction to read the option from config rather than defaulting it -- my first pass claimed that code had no pane_frames config available, which was wrong; it uses it two lines further down.
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index fd99fd87..ae92b3a3 100644
--- a/README.md
+++ b/README.md
@@ -331,6 +331,10 @@ printf '\033]5577;1;clear\033\\' # remove bo
╰ awaiting review ──────────────────────────[Approve]─[Reject]╯
```
+Buttons render as `[Approve]` by default, or `1:Approve` with
+`ui { pane_frames { status_bar_button_style "indexed" } }` — useful when something
+else binds those numbers to the same actions.
+
Full protocol reference, worked shell/Python consumers and the security model:
**[`sl0p/pane-status-bar.md`](sl0p/pane-status-bar.md)**.