diff options
Diffstat (limited to 'docs/typ')
| -rw-r--r-- | docs/typ/building.typ | 15 | ||||
| -rw-r--r-- | docs/typ/guide.typ | 11 | ||||
| -rw-r--r-- | docs/typ/reference.typ | 19 |
3 files changed, 29 insertions, 16 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ index 6b0e812a..9026aa4f 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -344,14 +344,17 @@ own process, ended by its hangup. A replica (a client running its own copy of the core, phase 5 of `docs/next-daemon.md`) connects to `pardes-replica.sock`, a stream socket beside it that `ssh -L` can forward. `src/wire.zig` is its -protocol (version 14): fixed-width little-endian fields, a 5-byte header +protocol (its `version`): fixed-width little-endian fields, a 5-byte header (tag, then a u32 length), the hello, a ping, the input events. The hello names a session and carries the client's semantics hash (the protocol, -release, commit, platform, build options and every dependency's hash); the -daemon refuses another build's, or a session nobody has, in words, and -hands an accepted connection to its session (`SCM_RIGHTS`), which welcomes -it and from then on is the one it talks to. Today the session answers -pings and nothing more. +release, commit, build options, every dependency's hash and the tape's +shape; the terminal's build and the window's share one, so either joins +the other's sessions); the daemon refuses another build's, or a session +nobody has, in words, and hands an accepted connection to its session +(`SCM_RIGHTS`), which welcomes it and from then on is the one it talks +to: the session sends the dump the client loads, then each step's tape and +its terminals' screens, and the client sends its inputs +(`src/replica.zig`; #doc("running") draws it). #word("Upgrade") (`src/upgrade.zig`) execs the path the session was started from, at a step boundary, after asking it `--version`: the session's dump diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index 6a50eef1..c78b8149 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -360,7 +360,9 @@ pardes --kill=work end it and its shells (--kill-all: every one) #word("Detach") (#key("SPC s D")) lets the terminal or the window go and leaves the session running, its panes, shells and files kept; so does a -terminal that closes. `pardes --attach` takes it back in any terminal, +terminal that closes, while the daemon (below) is there. A window that +closes ends its session, unless the session has clients. +`pardes --attach` takes it back in any terminal, `pardes-gui --attach` a window session's window: a terminal session takes a terminal, a window session a window. Attached already, it takes another view: each terminal or window has its own columns, focus, cursors and @@ -369,8 +371,11 @@ two takes the size of the one that last typed into it. #word("Detach") in one lets only that one go. A session is named by `--9p=` or `--detach=`, else its pid. A session killed outright leaves its shells running; #word("Adopt") in another takes them in as terminal panes, what -they showed gone. One `pardes --daemon` per user keeps all of it, and -leaves once nothing is kept. After a rebuild, #word("Upgrade") +they showed gone. One `pardes --daemon` per user lists the sessions and +holds their shells' terminals open; the first session starts it, it is +nobody's parent, and it leaves once it holds nothing. Which processes +run, and what survives what, is in #doc("running"). +After a rebuild, #word("Upgrade") (#key("SPC s U")) moves a running session onto the pardes now installed where it was started from, in place: its text and undo, its views, its terminals with their running shells, and its terminals and windows come diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index db4f9c77..dff79859 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -1010,8 +1010,10 @@ at 200, ending in `…`. Control characters become spaces. (#doc("building", section: "listeners")). - #file("/sessions"): what the pardes daemon keeps, as `pardes --ps` shows it, a record a line: `daemon <pid>`, then `session <pid> tty|gui - attached|detached <name>` with a `shell <pid>` line for each shell it - holds, then `orphan <pid>` for each shell no session holds. Any of the + attached|detached <name>` (attached: it has a terminal or window of its + own) with a `client <pid>` line for each of its clients and a + `shell <pid>` line for each shell it holds, then `orphan <pid>` for each + shell no session holds. Any of the names attaches (`pardes --attach=<name>`, either kind). Read fails `no pardes daemon answers` with none, or one too old to list (Upgrade it). - #file("/os/"): existing regular files take read, write and truncation to @@ -1339,11 +1341,14 @@ to its end before the write is answered, and one that finds nothing fails, each says so and exits 1. Bare `--detach` names the session after its pid; bare `--attach` needs exactly one detached session of its kind (a terminal's for `pardes`, a window's for `pardes-gui`), or with none detached the - only session of that kind; a second `--detach=NAME` + only session of that kind, joined as a client (with none of that kind, + the only session there is); a second `--detach=NAME` while NAME runs (a plain session is named by its pid) says so in words and exits 1. A session attached already is joined as a client, as one of - the other kind or on another machine is (`--attach=SOCKET:NAME`, its own - process, listed under the session by `--ps`), up to four clients: each + the other kind is, and one on another machine (`--attach=HOST:NAME`, over + `ssh -L`; `--attach=SOCKET:NAME` through a socket forwarded already): its + own process, listed under the session by `--ps`, up to three clients + (four views at once, the session's own among them): each terminal or window its own layout, focus, cursors, selections, modes, scroll and jumps, over the panes, texts, tags, terminals, messages and registers they share. A terminal pane shown in two takes the size of the @@ -1352,8 +1357,8 @@ to its end before the write is answered, and one that finds nothing fails, terminal closing, lets that client go and leaves the others. With none attached, `size C R` sets the screen, messages clear by the clock, and a pty reports its size in pixels at the last cell size (8×16 before any), - as CSI 14, 16 and 18 t do. Attaching from another machine is gone until - the replicated clients (docs/next-daemon.md, phase 5). + as CSI 14, 16 and 18 t do. Each way of running, and what survives + what: #doc("running"). - *Config.* The startup file is `$XDG_CONFIG_HOME/pardes/init` when that is absolute, else `~/.config/pardes/init` (macOS: `~/Library/Application Support/pardes/init`). A line that fails is a |
