diff options
Diffstat (limited to 'docs/typ')
| -rw-r--r-- | docs/typ/building.typ | 5 | ||||
| -rw-r--r-- | docs/typ/command-line.txt | 10 | ||||
| -rw-r--r-- | docs/typ/running.typ | 31 |
3 files changed, 39 insertions, 7 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ index d4732fa9..94939452 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -129,7 +129,7 @@ Every dependency but tree-sitter's runtime is lazy in the manifest, so such a package fetches what it asked for and nothing else. `pardes-editor` has `pardes-syntax` in it as `.syntax`: a file belongs to one module, so a package imports one of the two. `test/consumer` is -such a package, with both shapes; `lib-test`, which `unit-test` runs, +such a package, with both shapes; `consumer-test`, which `unit-test` runs, builds and runs it. `build.zig.zon` names pardes by its path: `.pardes = .{ .path = "../pardes" }`. @@ -197,9 +197,8 @@ zig build kitty-test kitty graphics conformance of terminal panes, at the zig build kitty-harness kitty graphics through a pane end to end (a fake kitty terminal outside on the tui, the GPU capture on the gui; kitten icat and chafa too when installed) -zig build syntax-test tree-sitter tests without building the editor zig build syntax deterministic per-byte highlighting snapshots -zig build lib-test the library, from a package that depends on pardes (test/consumer); +zig build consumer-test the library, from a package that depends on pardes (test/consumer); unit-test runs it too zig build hxlib helix's cases on the library's editor (-- --parity: against the file pane) zig build behaviour-test behaviour through the 9P tree, in process (test/behaviour/), diff --git a/docs/typ/command-line.txt b/docs/typ/command-line.txt index 0ced145f..2f7753e4 100644 --- a/docs/typ/command-line.txt +++ b/docs/typ/command-line.txt @@ -39,10 +39,12 @@ The old spellings --ps, --attach[=NAME], --kill=NAME, --kill-all, -h and == pardes help ps What the per-user daemon lists: each session with its name, pid, kind -(tty or gui) and whether it has a frontend of its own or is detached; -under it its clients and its shells; then the shells no session holds, -which Adopt takes. /sessions is the same list, read from inside a -session (where a session with a frontend says attached). +(tty or gui) and whether it has a frontend of its own or is detached +(under PARDES_PAIR: kept, or nothing when its last client's close +ends it); under it its clients and its shells; then the shells no +session holds, which Adopt takes. /sessions is the same list, read +from inside a session (where a session with a frontend says +attached, and a pair's not kept says pair). Usage: pardes ps diff --git a/docs/typ/running.typ b/docs/typ/running.typ index 74eb8cbd..320b3130 100644 --- a/docs/typ/running.typ +++ b/docs/typ/running.typ @@ -205,6 +205,37 @@ daemon died is not: it starts the next one itself (#link(<run-survives>)[below]) `pardes-gui` built for a Mac has no daemon either, but can still be a far client. += An experiment: `PARDES_PAIR` <run-pair> + +// runtime/main.zig pair (the fork); runtime/daemon.zig State, keepSession; +// core/replica.zig Peers.leave, Peers.detach; runtime/session.zig (the +// end); dev/tui/tui.zig runClient and winchWatch (HUP and TERM a close); +// dev/gui/gui.zig Input.close; runtime/upgrade.zig Record.state. +With `PARDES_PAIR=1` in its environment (`export PARDES_PAIR=1`; unset, +none of this happens), `pardes FILE` in a terminal and `pardes-gui FILE` +start the way every frontend will: the process you started forks a +session with no terminal or window of its own and is its first client, +the job your shell waits on. A session is _kept_ or not: kept from birth +when started with `pardes new --detach` (or `--detach`), and once a +#word("Detach") is typed in any of its clients; an #word("Upgrade") keeps +which. `pardes ps` says `(tty, kept)` of a kept session and `(tty)` of +one that is not. + +#{ + set text(size: 0.85em) + set par(justify: false) + table( + columns: (1.2fr, 1.6fr, 0.9fr), + stroke: (x, y) => if y == 0 { (bottom: 0.8pt) } else { (bottom: 0.3pt) }, + inset: (x: 4pt, y: 4pt), + table.header([*what happens*], [*not kept*], [*kept*]), + [#word("Detach") typed in a client], [it becomes kept; the client says so and exits 0], [the same], + [a window closed, a terminal closed, a TERM to a client], [the client says goodbye and exits 0, its terminal put back; the session ends if that was its last client], [it runs on], + [a client killed outright (KILL) or crashed], [it runs on, listed by `pardes ps`], [it runs on], + [no daemon], [it ends with its last client, whatever ended it], [cannot be: #word("Detach") refuses], + ) +} + = At a glance <run-glance> // The rows' sources are the sections above; `ps`: |
