summaryrefslogtreecommitdiff
path: root/test/snapshots/themesel.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-31 02:21:01 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:08 -0300
commit0bfa4615988c0d1bcaa38453375760c60076c5ea (patch)
treefab4f972c10b07739aabc9d772c43e102bce2c07 /test/snapshots/themesel.snap
parentbe404e0d4f91548af6ed600b2fd2027ad8a041c7 (diff)
downloadpardes-0bfa4615988c0d1bcaa38453375760c60076c5ea.tar.gz
pardes-0bfa4615988c0d1bcaa38453375760c60076c5ea.zip
themes: one file each, generated from helix and zed, picked by stepping a list
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.
Diffstat (limited to 'test/snapshots/themesel.snap')
-rw-r--r--test/snapshots/themesel.snap63
1 files changed, 63 insertions, 0 deletions
diff --git a/test/snapshots/themesel.snap b/test/snapshots/themesel.snap
new file mode 100644
index 00000000..3dd7e2dc
--- /dev/null
+++ b/test/snapshots/themesel.snap
@@ -0,0 +1,63 @@
+# RULE: a results buffer is a list of things you can RUN, and its traits say
+# which verb runs them. Every list before this one held LOCATIONS, so stepping
+# a row with n/N Looks it. `SPC t t` (ThemeSel) opens the first one whose rows
+# are COMMANDS — `Theme <name>`, exactly the line you would type — so n/N Exec
+# each row instead. Walking the list therefore wears the themes as you pass
+# them, and picking one is stopping on it: there is no preview state, nothing
+# to confirm and nothing to cancel, because arriving already did it.
+#
+# Both halves of the ring are in the buffer: the three pardes ships with come
+# first (helix, dark, acme), then everything tools/gen_themes.zig exported from
+# the vendored helix .toml and zed .json files, sorted. The colors below are
+# read with snapstyle, so this proves the generated themes are real data and
+# not just names in a list.
+lines t.txt 40
+start 30 100 t.txt
+wait 8000 t.txt
+stable 700 20000
+snap boot
+# SPC t t: the list lands below the pane that asked, focus stays HERE — n/N are
+# read in this pane and they step the buffer they just armed.
+key space t t
+wait 10000 Theme helix
+stable 700 15000
+snap list
+# n selects row 1 and runs it: `Theme helix`, which is already the boot theme,
+# so only the selection moves. That is the honest first step — an idempotent
+# command has to be safe to step onto.
+key n
+stable 700 15000
+snap step-helix
+snapstyle step-helix
+# ...and now the theme really does change under the cursor, one row at a time
+key n
+stable 700 15000
+snap step-dark
+snapstyle step-dark
+key n
+stable 700 15000
+snap step-acme
+snapstyle step-acme
+# past the curated three and into the generated half: a zed theme, palette and
+# all (zed names its sixteen terminal ANSI colors, so a generated one can
+# repaint a shell's output where a helix theme leaves it alone)
+key n
+stable 700 15000
+snap step-generated
+snapstyle step-generated
+# N walks back the same way, running the row it lands on — so the theme
+# rewinds too
+key N
+stable 700 15000
+snap step-back
+snapstyle step-back
+# PICKING is just stopping. Walk down into the list and Esc it away (an output
+# buffer has no file behind it, so Esc IS Del there): the theme the last step
+# left behind is still on.
+key space w j
+stable 400 5000
+key esc
+settle 100
+stable 700 15000
+snap picked
+snapstyle picked