From 0bfa4615988c0d1bcaa38453375760c60076c5ea Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 31 Jul 2026 02:21:01 -0300 Subject: themes: one file each, generated from helix and zed, picked by stepping a list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each theme is a .zig file of pure data and nothing enumerates them by hand — fold() walks the container's declarations, so a theme is a file and that is the whole registration. Field by field rather than a wholesale coercion, which makes a missing field a compile error that names it. tools/gen_themes.zig reads helix .toml and zed .json out of vendor/themes and emits one .zig each; build.zig reads that directory, so adding a theme is dropping a file in. Output goes to the build cache rather than the tree, so zig owns the freshness check and a deleted source cannot leave a stale theme behind. Vendored, not read from the genizah: the build stays offline. A source it cannot map is a hard error naming the file and the key, never a silently black-on-black theme. ThemeSel is the clever half. Traits gained an `executes` column, so n/N over that buffer hands the whole line to Exec instead of the leading word to Look — both arms the ordinary builtin, so a stepped row does exactly what the matching mouse button on it would. Stepping the list previews each theme live. The trait is a pane property, not an output-pane branch, so any pane whose lines are commands can opt in. Goldens: leader gains SPC t t; theme's fourth NextColor no longer wraps to helix because the ring is fifteen long. New: themesel. --- docs/design.typ | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'docs/design.typ') diff --git a/docs/design.typ b/docs/design.typ index 7a9cc5c7..5d6daad2 100644 --- a/docs/design.typ +++ b/docs/design.typ @@ -243,13 +243,19 @@ visible-range first), Save, open-at-line, undo/redo. Image: zstbi decode, kitty graphics when available, petscii matcher fallback (C64/terminal palettes, ascii glyph set toggle). Tutor: embedded text as file pane. -*Chrome.* Themes helix (default; near-black page, chrome one grey-ramp step -off it, colors lifted from the helix editor's own theme), dark, acme-light — -the first two leave a child's ANSI palette native, acme-light resolves it onto -the page so shell output stays readable on yellow. A theme owns the page, the -tag bar, the gutter and the move box; the selection colors stay fixed because -they encode which button you pressed. Colors toggles all recolor passes; Debug -stats overlay; Dump writes state ZON. +*Chrome.* One theme per `.zig` file, folded into the ring at comptime: ours +first — helix (default; near-black page, chrome one grey-ramp step off it, +colors lifted from the helix editor's own theme), dark, acme-light — then +everything `tools/gen_themes.zig` exports at build time out of the vendored +helix `.toml` and zed `.json` sources in `vendor/themes`. helix and dark leave +a child's ANSI palette native; acme-light and the zed exports resolve it onto +the page so shell output stays readable on a light one. A theme owns the page, +the tag bar, the gutter and the move box; the selection colors stay fixed +because they encode which button you pressed. `NextColor` walks the ring, +`Theme ` jumps to one and `ThemeSel` (`SPC t t`) lists them all into an +output buffer whose rows are those very commands — so n/N EXECUTE each row +instead of looking it and stepping the list wears the themes. Colors toggles +all recolor passes; Debug stats overlay; Dump writes state ZON. *Web (replay viewer parity).* Embedded dump; focus, border/move drags, wheel, scrollbar, Colors/NextColor, pinch, render scale, and link-LOOK opening a new -- cgit v1.3