summaryrefslogtreecommitdiff
path: root/docs/typ
diff options
context:
space:
mode:
Diffstat (limited to 'docs/typ')
-rw-r--r--docs/typ/building.typ3
-rw-r--r--docs/typ/reference.typ43
-rw-r--r--docs/typ/setup.typ19
3 files changed, 50 insertions, 15 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ
index 456cbb3e..4b736251 100644
--- a/docs/typ/building.typ
+++ b/docs/typ/building.typ
@@ -224,7 +224,8 @@ pings and nothing more.
#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
-goes to the DumpDir (`pardes-upgrade-<pid>.dump`), and its pty masters,
+is committed to the state file as `upgrade-<pid>` (the build before wrote
+`pardes-upgrade-<pid>.dump`, which this one still reads, for one release), and its pty masters,
terminals, stubs and daemon link stay open across the exec, named in a
record on the new command line (`--upgraded=`) ahead of the arguments it
was started with. The pid stays, so the shells stay its children; the new
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index d0f492cf..cb2df2a8 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -160,7 +160,7 @@ the next read on that fid is EOF until the next write (or seek to 0). With
other clients about, write and read on one open:
#cmd("exec 3<>$m/pane/$n/look; echo x >&3; cat <&3; exec 3<&-")
-*Snapshots.* #file("/index"), #file("/layout"), #file("/recent"),
+*Snapshots.* #file("/index"), #file("/layout"), #file("/recent"), #file("/dumps"),
#file("/commands"), #file("/status"), #file("/listeners"), #file("/sessions"), a read-only
#file("ctl"), #file("/log"), #file("/screen") and a terminal's
#file("body") freeze at the open, so one read in several chunks never
@@ -192,7 +192,7 @@ the range and flag files, the workspace's #file("tag"), the root
#file("look")/#file("exec") answers, #file("focus"); #file("event") and
#file("pty/data") the next record's, zero when none waits. A stream and a
view generated by each read stat 0, as acme's do: #file("log"), #file("screen"), #file("data"), #file("xdata"), #file("index"),
-#file("layout"), #file("recent"), #file("listeners"), #file("sessions"), #file("pane/new").
+#file("layout"), #file("recent"), #file("dumps"), #file("listeners"), #file("sessions"), #file("pane/new").
Read those to the end rather than trust a length (`cat` does). The qid
version of #file("body"), #file("data") and #file("xdata") is the pane's
revision, so a stat sees an edit land. Modes are 0644/0666, 0444
@@ -389,20 +389,30 @@ Writes take settings and session builtins (`scope = .session` in
#word("Delcol") and a pane's `get` refuse the same way with their own
word, except that #word("Delcol") opens no `+Unsaved` pane: it names the
panes only in its `unsaved` records and its notice.
-- #word("Dump") writes `pardes-<date>-<time>.dump` (UTC) in #word("DumpDir"),
- logs `dump <path>`, and adds a #word("Restore") `<path>` word naming it to the
- workspace tag (the last dump's, replacing an earlier one's).
- #word("Restore") `[path]` replaces every pane (bare: the last dump this session
- wrote). The #word("Restore") write is answered, then *every connection is hung
+- #word("Dump") puts the session in the state file (`pardes.xitdb` in
+ #word("DumpDir"), below) under a label, `pardes-<date>-<time>` (UTC;
+ `-2` and on for another in the same second), logs `dump <label>`, and adds a
+ #word("Restore") `<label>` word naming it to the workspace tag (the last
+ dump's, replacing an earlier one's). The state file keeps the newest 32
+ dumps, and a text unchanged since an earlier one once; #file("/dumps")
+ lists them. `Dump export <path>` writes the dump to a file of its own
+ instead (`~` the home directory; the tag's word then names the path), which
+ `-l <path>` and #word("Restore") `<path>` read: the way to carry a session to
+ another machine.
+ #word("Restore") `[label|path]` replaces every pane: the state file's dump of
+ that label, or the dump in that file (an old `.dump` file too, for this
+ release); bare, the last dump this session made, else the newest. The
+ #word("Restore") write is answered, then *every connection is hung
up*: dial again, and restart a 9ns mount. The new log has a `new` per
- pane, then `restore <path>`. Its panes and columns keep the serials they
+ pane, then `restore <label|path>`. Its panes and columns keep the serials they
had when dumped; one made after takes a serial past every one the old
session handed out. A dump keeps every pane's text and undo: a clean
file changed on disk since comes back as it is now, an unsaved one with
its own text, marked changed on disk, and its first #word("Save") asks
before overwriting. A #word("Restore") of a file that is no dump fails
- before anything is replaced (`not a pardes dump: it is cut short`), with
- EIO: read the `err` record for why. A #word("ThemeFile") the dump names that fails to load changes
+ before anything is replaced (`not a pardes dump: it is cut short`), and one
+ of a label the state file keeps none of says `Restore: no dump labelled
+ <label>`, each with EIO: read the `err` record for why. A #word("ThemeFile") the dump names that fails to load changes
nothing.
- #word("Kill") `[word...]` (above), #word("Mount") `name dial`, #word("Unmount") `name`, #word("Theme") `x`.
- `size C R` sizes a session no terminal or window is attached to (160x50
@@ -438,7 +448,7 @@ word clicked in a tag does. The same lines go in the startup file
[#word("JumpScope") `file|all`], [`file`: #word("Back") and #word("Forward") keep to the focused pane's file, that pane's places first, then the file's in another pane, and go to another file only when the file has no place left that way; from a terminal or a pane with no file they step through every place; `all`: every place, in the order it was jumped to],
[#word("TermImages") `real|petscii`], [`real`: a new terminal draws its program's kitty graphics (yazi's previews) as pixels where the shell can; #word("Petscii") flips one terminal; a tui under a terminal without kitty graphics draws them as glyph art either way],
[#word("Shell") `<name or path>`], [`$SHELL` when it is executable, else `/bin/sh`: the shell the next terminal and command pane run; a bare name is searched for in the usual bin directories, not `$PATH`; bare #word("Shell"): `$SHELL` if it is executable, else `/bin/sh`],
- [#word("DumpDir") `<dir>`], [`$XDG_DATA_HOME/pardes`, else `~/.local/share/pardes`: where #word("Dump") writes, an absolute or `~` path to a directory that may be written (made if missing); a relative one, or one under a directory that may not be written, is refused; bare returns to the default],
+ [#word("DumpDir") `<dir>`], [`$XDG_DATA_HOME/pardes`, else `~/.local/share/pardes`: the directory of the state file, `pardes.xitdb`, which keeps Recent and the dumps and which every session of the user shares (one that cannot be read as one is kept aside as `pardes.xitdb.broken` and a new one started); an absolute or `~` path to a directory that may be written (made if missing); a relative one, or one under a directory that may not be written, is refused; bare returns to the default],
[#word("TreeContext")], [off: sticky declaration headers in a source pane (per pane, dumped)],
[#word("TreeContextTagStyle")], [on: draw those headers in the tagline style],
[#word("LocationsConfig") `...`], [the layout of #word("Grep"), search and language-server results (below)],
@@ -890,7 +900,7 @@ just before the #word("Restore") are not lost.
[`ask <serial> <what> <choices>`, `answer <serial> <choice|->`], [a pane asked, and was answered (`-`: taken back, or the pane closed)],
[`changed <serial> [reloaded|deleted]`], [its file changed on disk (bare: under unsaved edits)],
[`unsaved <serial> <name>`], [a pane an #word("Exit"), #word("Restore"), #word("Del") or #word("Delcol") refused over, before the `err`],
- [`dump <path>`, `restore <path>`], [a #word("Dump") written; a #word("Restore"), after its panes' `new`s],
+ [`dump <label|path>`, `restore <label|path>`], [a #word("Dump") written (a label of the state file's, or the file `Dump export` named); a #word("Restore"), after its panes' `new`s],
)
The serial is the pane the line ran at (the pane with the keyboard for the root's
@@ -927,12 +937,17 @@ at 200, ending in `…`. Control characters become spaces.
pane from the root).
- #file("/recent"): up to 200 files, PDFs and images, most recent first,
`open <path>` or `closed <path>` (open in this window or not), every
- window's: kept in `$XDG_STATE_HOME/pardes/recent`, shared by every pardes
- process, each reading what the others wrote when it is next read.
+ window's: kept in the state file (#word("DumpDir")'s `pardes.xitdb`), shared
+ by every pardes process, each reading what the others wrote when it is next
+ read.
#word("Recent") lists them in a query pane (line 1 `Recent`, the rest
narrowing them by a fuzzy match), an open one at its dot now and a
closed one at its last (a PDF's is its page); a #word("Look") of a row reopens it
there.
+- #file("/dumps"): the dumps the state file keeps, a line each, the newest
+ first: `<label> <date> <size> <panes>`, the date UTC
+ (`2026-11-05T12:00:00Z`), the size the dump's bytes (its session and the
+ texts it keeps); #word("Restore") `<label>` brings one back.
- #file("/status"): `pid`, `version`, `panes`.
- #file("/pager"): write a directory, `~` expanded and resolved (an empty
line is the session's; one not there is refused ENOENT, a relative one
diff --git a/docs/typ/setup.typ b/docs/typ/setup.typ
index 466b178a..c94751da 100644
--- a/docs/typ/setup.typ
+++ b/docs/typ/setup.typ
@@ -6,6 +6,25 @@
= Install <install>
#include "install.typ"
+= The files pardes keeps <files>
+
+- `~/.config/pardes/init`, the startup file; `themes/` there, the
+ #word("ThemeFile")s and #word("DumpThemes")'s; `crashes` there, a line or
+ two each time pardes panicked.
+- `pardes.xitdb` in the #word("DumpDir") (`$XDG_DATA_HOME/pardes`, else
+ `~/.local/share/pardes`): the state file, a xitdb database every session
+ of yours shares: Recent and the dumps (#file("/dumps") lists them). It is
+ compacted at a session's end once it holds mostly what no dump keeps.
+- `cache.xitdb` in `$XDG_CACHE_HOME/pardes` (else `~/.cache/pardes`): a far
+ client's blob cache, a gigabyte at most (`PARDES_BLOB_CACHE_MB`), safe to
+ delete.
+- In `$XDG_RUNTIME_DIR`: the sessions' sockets and their registry entries
+ (`9p/pardes/`), and a pane on its way to another window.
+- From the build before: `~/.local/state/pardes/recent` (and `store` beside
+ it) is read once into the state file; `pardes-*.dump` files in the
+ DumpDir are read by #word("Restore") `<path>` and `-l`, for one release; the
+ directory `~/.cache/pardes/blobs` is no longer read. Each can be deleted.
+
= A 9P mount: 9ns <ninens>
`9ns`, from cloud9 (`git.sr.ht/~gbrls/cloud9`, whose `zig build` builds it