diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 22:46:35 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 22:46:35 -0300 |
| commit | 806dc79a694c9df50cf3e13e9091986ebc74cb96 (patch) | |
| tree | 04b7383d2b20ab08539a9b384beceee38168c882 /core/builtins.zig | |
| parent | 791d47a64db09f842d23b3d0b03c40951f30aae6 (diff) | |
| download | pardes-806dc79a694c9df50cf3e13e9091986ebc74cb96.tar.gz pardes-806dc79a694c9df50cf3e13e9091986ebc74cb96.zip | |
Pick: SPC t t (Themes) is a picker of the themes in the asking pane's own tag, the whole window wearing the theme under the cursor and no pane dimmed (every one flagged previewing), Enter wearing it, Esc putting the session's own back (pick-ui SPEC §5.1, §3.6, walk UI line F item 4): a source `themes` (Pick.Source; its rows the themes in their order, the cursor starting on the one worn; no reader, no acts, no other sources, no second row), its preview colors.previewTheme, the one function the `:theme ` argument rows can call too: Pardes.theme_preview over the session's theme in theme() and chromeTheme() (its chrome worked out once a theme, never a frame; nothing loaded, a ThemeFile and a custom theme untouched under it), set in the step of the key that moved the cursor (Pick.produceAll) and cleared at the roll-up; both fields on root.zig's kept_out list (derived from the picker's cursor, which the digest has); Themes from a 9P script or under `Jumps new-pane` opens +Themes as before; TEST: Pick.zig "SPC t t is a picker of the themes ..." (its host, the cursor on the worn theme, every pane previewing, Down wears the next with the session's unchanged, Esc, Enter); core-test 1027/1194 (167 skipped), 0 failed, load 8
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/builtins.zig')
| -rw-r--r-- | core/builtins.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/builtins.zig b/core/builtins.zig index c7e821dd..eac52555 100644 --- a/core/builtins.zig +++ b/core/builtins.zig @@ -797,6 +797,9 @@ pub const Themes = struct { pub const scope: Scope = .session; pub const output: OutputTraits = .{ .name = config.themes_buffer, .steps = true, .commands = true }; pub fn run(c: Ctx) void { + // From the keyboard, where the walk is on: a picker in the tag, the + // window wearing its row (Pick.zig, SPEC §5.1). + if (pardes.Pick.asked(c.p)) return pardes.Pick.open(c.p, c.id, .themes, "", "", ""); panes.Output.openThemes(c.p, c.id) catch |err| c.p.reportError(.at(c.id), "themes", err); } }; |
