summaryrefslogtreecommitdiff
path: root/docs/fs.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 09:32:02 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit0ee8d748c028ad5257f95e15db38646aecd2851b (patch)
tree48b34e5604cd55f64bd9b323fdb9a2a6d0d60588 /docs/fs.md
parentcc5323772d5acd07376c561e8e08eaf365b7d22c (diff)
downloadpardes-0ee8d748c028ad5257f95e15db38646aecd2851b.tar.gz
pardes-0ee8d748c028ad5257f95e15db38646aecd2851b.zip
A root focus file names the pane with the keyboard and moves it; a pane's ctl says whether it is current
Scripts had no way to ask which pane has the keyboard or to give it one. rio answers both through a window's wctl: its read ends with current or notcurrent, and a write of current takes the keyboard (rio(4)). A pane's ctl line now ends the same way, and since there is one keyboard for the whole tree, /focus reads the focused pane's serial and takes a serial to move the keyboard there, off any header that had it; a serial no pane has fails with "no such window". fs-bench's stale readdir check is fixed too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/fs.md')
-rw-r--r--docs/fs.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/fs.md b/docs/fs.md
index 589f4287..c2819adb 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -80,6 +80,7 @@ Existing Plan9port/v9fs clients need a userspace bridge for QUIC.
write follow to that open to wait for more
/screen rendered screen JSON; frozen per open handle
/listeners the session's dial addresses
+/focus the serial of the pane with the keyboard; write a serial to give it the keyboard
/pane/new open it to make a pane; the read answers that pane's serial
/pane/<n>/ name body tag ctl addr dot limit data xdata sel dirty mark scroll
errors event look exec, plus pty/{ctl,status,data} on terminals
@@ -87,6 +88,12 @@ Existing Plan9port/v9fs clients need a userspace bridge for QUIC.
/src/ the editor's embedded sources, only when built with -Dembed-sources=true
```
+`/focus` reads the serial of the pane with the keyboard, and a serial written
+to it gives that pane the keyboard, off any column or workspace tag that had
+it -- rio's `current` written to a window's `wctl`, named once for the whole
+tree since there is one keyboard. A serial no pane has fails with `no such
+window`; anything but a number, with `ill-formed control message`.
+
A pane is made by **opening** `/pane/new`, and closed by Tremove on
`/pane/<n>` (`rmdir`), which is the only remove the tree serves; Tcreate is
refused everywhere, as it is in acme. Reading the open fid answers the serial
@@ -153,7 +160,8 @@ appends to the directory's `+Errors` pane. Holding `event` open redirects the
pane's Look and Exec clicks to that client; writing a record back performs the
action. `ctl` reads acme's window status line — serial, tag length, body
length, a reserved zero, the dirty flag, the width in cells, the font and the
-tab width — and takes `get`, which reloads the buffer from the name it
+tab width — followed by rio's `current` or `notcurrent` (rio(4), `wctl`):
+whether the pane has the keyboard. It takes `get`, which reloads the buffer from the name it
carries, and acme's `lock` and `unlock` (editors/acme/xfid.c:603-611), for an
edit of several writes to `addr` and `data` that another client must not
land in the middle of. As in acme the lock binds only the clients that take