diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 13:05:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 13:16:47 -0300 |
| commit | f700b2af8e874c586e6996b8311c3983203c6637 (patch) | |
| tree | 89c7de940f888a0917e5851c8a362c83de50b389 /docs/typ/cheatsheet.typ | |
| parent | f6a511c61d7ef2ff680f70077b236559a595be69 (diff) | |
| download | pardes-f700b2af8e874c586e6996b8311c3983203c6637.tar.gz pardes-f700b2af8e874c586e6996b8311c3983203c6637.zip | |
Builtins are chips that link to a glossary generated from the registry, and the virtual filesystem is drawn as a tree
#word draws a builtin as a chip on the tag's ground over a rule (Look and
Exec in acme's look green and exec red), a <code class="word"> in HTML,
and links it to its entry in a new Builtins chapter wherever that
chapter is in the same output (the book, the site). The chapter is
drawn from docs/typ/builtins-tty.json and builtins-gui.json, which
`zig build builtins-json -Dplatform=tty|gui` writes from the registry
and the Help rows (src/builtins_json.zig, tools/gen_builtins_json.zig;
summaryOf in ninep/ctl.zig is now pub); style.typ merges them, marking
the window-only words. The doc steps refresh their build's file first,
and each build's unit-test fails when its file is stale. Everyday words
first (`everyday` in style.typ), then groups by leader prefix as Help
has them, then settings, the words with no path, debugging and
internals, and last an A-Z index of every word. `zig build book` joins
the doc steps.
#fstree draws a directory tree with its connectors, a description
column and links to the sections that document each file; reference.typ
draws the served tree with it, each pane, pty and column file on its
own line, and a test in config.zig checks it against ninep/tree.zig's
files both ways. The cheatsheet has a two-level version. On the site
the tree reads as `tree` text in w3m and wraps descriptions under the
names on a phone.
The site's tutor draws its B1, B2, B3 and 1-2 chords as mouse glyphs;
the landing credits Plan 9 and acme, as does the book's title page;
install.typ no longer lists the mirrors (the footer does).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/typ/cheatsheet.typ')
| -rw-r--r-- | docs/typ/cheatsheet.typ | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/docs/typ/cheatsheet.typ b/docs/typ/cheatsheet.typ index c4be1641..3c5ea2b2 100644 --- a/docs/typ/cheatsheet.typ +++ b/docs/typ/cheatsheet.typ @@ -2,7 +2,7 @@ // cheatsheet-a4.typ lays it out; style.typ says how each element looks. // config.zig's "docs/typ" test checks every #word, #key and #tag here // against the registry, the keymap and the default tags. -#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs, fstree == The mouse #pairs( @@ -134,15 +134,18 @@ Helix-style: motions *select*, then an edit acts on the selection. Mode box: bla Pane shells get `$PARDES_9P` (the socket) and `$PARDES_PANE` (their own pane); a command clicked in a pane also gets `$winid`, the pane it was clicked in. #cmd("9ns --mntgen # then m=$PARDES_MOUNT in every pane") #cmd("9p -a \"unix!$PARDES_9P\" read index") -#pairs( - file("index"), [a line per pane: serial, kind, name], - file("look exec"), [write a line: a #btn("B3") or #btn("B2")], - file("log"), [events; write `follow` to wait], - file("pane/new"), [open to make a pane], - file("pane/N/addr"), [an address; `data` reads/replaces it], - file("pane/N/ctl"), [builtins: #word("Save"), #word("Edit") `...`], - file("pane/N/body tag"), [its text (`>>` appends)], -) +#fstree(``` +index a line per pane @rules +look write: a right click @look-and-exec +exec write: a middle click @look-and-exec +log events; follow waits @log +pane/ + new open: a new pane @panes + <n>/ + addr where data reads, writes @addresses + ctl builtins: #word("Save"), #word("Edit") @panes + body its text (>> appends) @panes +```) #cmd("echo notes.txt:12 > $m/pane/$n/look") #cmd("echo /foo/ > $m/pane/$n/addr; printf bar > $m/pane/$n/data") #cmd("echo 'Edit ,x/foo/c/bar/' > $m/pane/$n/ctl") |
