summaryrefslogtreecommitdiff
path: root/src/tutor.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tutor.txt')
-rw-r--r--src/tutor.txt47
1 files changed, 21 insertions, 26 deletions
diff --git a/src/tutor.txt b/src/tutor.txt
index f712ab85..b2110dd8 100644
--- a/src/tutor.txt
+++ b/src/tutor.txt
@@ -230,11 +230,9 @@
WHAT A DAEMON CAN ALSO DO
A detached session serves acme's control filesystem like any other:
- pardes --detach=work --fs the tree under $XDG_RUNTIME_DIR
- pardes --detach=work --fs9 the same tree, as 9P on a unix socket
+ pardes --detach=work 9P on the session's default unix socket
- Either, both or neither. That is what makes a daemon scriptable while
- nobody is looking at it — see part 6.
+ Every native session is scriptable over 9P — see part 6.
The socket lives in $XDG_RUNTIME_DIR (else ~/.local/state/pardes),
created 0700, never /tmp: it carries keystrokes into a live editor.
@@ -368,7 +366,7 @@ typed
abandons it, and so does any key that leads nowhere.
SPC ? list every path
- SPC k Kill SPC d Del
+ SPC d Del Kill remains available in the topbar.
SPC f s Save SPC f f Find SPC f n New
SPC y Y p P R the system clipboard
SPC w h/j/k/l focus a neighbouring pane
@@ -397,46 +395,43 @@ typed
plugin API, no interpreter and no rebuild. A program that opens files
IS an extension.
- pardes --fs acme's control files over FUSE
- pardes --fs9 the same tree as 9P on a unix socket
+ pardes the 9P socket opens by default
A directory per pane holding `body`, `tag`, `ctl`, `addr`, `data`,
`event`, `pty/` and the rest, plus `index`, `cons` and `new/` at the
- top. Every pane shell is told `$PARDES_FS` and `$PARDES_PANE`, so a
- script in a pane addresses its own window with no arguments:
+ top under /self. Every pane shell receives `$PARDES_9P` (the socket)
+ and `$PARDES_PANE` (its serial). Use a 9P client to read and write:
- echo hello >> $PARDES_FS/$PARDES_PANE/body
- cat $PARDES_FS/index
- echo hi > $PARDES_FS/new/body
+ /self/pane/<serial>/body
+ /self/index
+ /self/new/ctl
A terminal pane also has `pty/`:
- echo 'winsize 100 30' >> $PARDES_FS/3/pty/ctl
- echo 'sig INT' >> $PARDES_FS/3/pty/ctl
- echo 'make -j8' >> $PARDES_FS/3/pty/data
+ /self/pane/3/pty/ctl winsize, sig
+ /self/pane/3/pty/data terminal input/output
Over 9P the same tree answers plan9port, from anywhere:
9p -a $XDG_RUNTIME_DIR/pardes-9p-work.sock ls /
- 9p -a $XDG_RUNTIME_DIR/pardes-9p-work.sock read /index
+ 9p -a $XDG_RUNTIME_DIR/pardes-9p-work.sock read /self/index
...and pardes is a 9P CLIENT too, so one session can read another's:
- 9p work.sock /1/body the `9p` word: opens it in a pane
+ pardes --mount=peer=work
+ /n/peer/self/pane/1/body Look opens the other session's body
TWO THINGS WORTH KNOWING. While a program holds a pane's `event` file
open, MIDDLE AND RIGHT CLICKS IN THAT PANE BELONG TO IT: pardes reports
them and performs nothing, so that pane's tag can carry the program's
- own words (examples/acmefs/life.py puts Step/Run/Clear there). The
- keyboard is never suppressed, and the clicks come back when it exits.
+ own words. The keyboard is never suppressed, and the clicks come back
+ when it exits.
And writing an event record back — `origin type q0 q1` — makes pardes
perform the Look or Exec it names. That is arbitrary command execution
- by design, the same door acme has always had, which is why the mount
- sits under $XDG_RUNTIME_DIR at 0700 and why both flags are opt-in.
+ by design. The socket sits in the user's private runtime directory.
- examples/README.md is the client's guide; docs/acme-fs.md compares this
- implementation with acme's file by file; docs/9p.typ is the 9P note.
+ docs/fs.md describes the filesystem and mount paths.
=================================================================
@@ -466,7 +461,7 @@ typed
Attach / Detach the same, as words (SPC s a / s D)
the pane shells belong to the SESSION and never stop
N frontends share ONE screen at the smallest common grid
- --fs and --fs9 work in a daemon too
+ the default 9P socket works in a daemon too
KEYS h j k l w b e 0 $ ^ gg ge f F t T v x d c y p
i a I A o O u undo U redo
@@ -480,8 +475,8 @@ typed
/ is a case-insensitive SUBSTRING search, not a regex
SPC is the leader (SPC ? lists every path)
- SCRIPTING --fs acme's files over FUSE; --fs9 the same over 9P
- $PARDES_FS/<id>/{body,tag,ctl,addr,data,event,pty/}
+ SCRIPTING 9P is served by default on $PARDES_9P
+ /self/pane/<id>/{body,tag,ctl,addr,data,event,pty/}
a script holding `event` owns that pane's middle and right
clicks; writing a record back runs it