aboutsummaryrefslogtreecommitdiffstats
path: root/docs/scripting.md
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-22 12:50:12 +0200
committeruser <user@clank>2026-09-22 12:50:12 +0200
commit6283e484613116d1c38cab9a43e3330e09042193 (patch)
treeaca8fc6c1dd37d78078fc81c7bc27cb30476f964 /docs/scripting.md
parenttheme: a name and a directory, not sixty colours in your config (diff)
downloadslosh-6283e484613116d1c38cab9a43e3330e09042193.tar.gz
slosh-6283e484613116d1c38cab9a43e3330e09042193.tar.xz
slosh-6283e484613116d1c38cab9a43e3330e09042193.zip
themes: a picker that wears them as you browse (C-a t)
`theme_name` is a line in a file, and a name in a list tells you nothing about a colour scheme. So the picker previews by *applying*: moving the selection puts that theme on, which is the only honest preview of a palette meant to dress a whole session -- a swatch in a list would be a small lie about it, and the session is already on screen behind the box. It opens on the theme being worn rather than at the top, so the first arrow press moves off it instead of silently changing the session, and the row your config names says so, because "which one is this" and "which one comes back on restart" are two different facts the moment you switch. Escape puts back what was worn, since a picker that changed your session by being looked at is one you stop opening. Enter keeps it for the session and says as much. Only C-s writes `theme_name` into your config, which is the one place in the UI where a keystroke edits it, so it is a deliberate chord and the footer says so: "C-s keeps it, esc undoes". Reuses the picker the finder, the palette and the projects list already wear -- one machine with a subject, so the query, the selection, the mouse, the frame and the scroll behaviour are the ones already tested. The list is scanned on the keystroke, like the projects are: the moment it opens is the moment it has to be right, and a theme written since the session started is exactly the one being looked for. With nothing to list it toasts the directory it looked in rather than opening an empty box. `t` was free: tabs cycle on tab, and new-tab has had `c` since the first day.
Diffstat (limited to 'docs/scripting.md')
-rw-r--r--docs/scripting.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/scripting.md b/docs/scripting.md
index 941dd7f..048a7fa 100644
--- a/docs/scripting.md
+++ b/docs/scripting.md
@@ -47,6 +47,7 @@ Panes and tabs are addressed by **id**, so a background tab is scriptable.
| `reload` | re-read the config; answers `{"ok":true,"warning":...}` if it had a complaint |
| `splash` | replay the attach greeting; `fx` and `motion` pick the colour effect and the assembly by index, for a deterministic one |
| `edit-config` | open the config in a pane |
+| `theme` | without `name`, what is installed and what is worn (`theme` `themes` `dirs`); with one, switch now, and `save:true` writes the `theme_name` line into the config. See [themes](config.md#themes) |
| `alive` | is it running, and how many panes and tabs |
| `quit` | end the session |