diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -77,6 +77,23 @@ Fields: `kind`, `group` (a tmux session, a workspace), `groupNumber`, optional; names are cut to 128 bytes. A place given this way stands until the next one, so the extension can update it whenever it likes. +## Opening new agents + +A client can stop a pi, and open a new one beside it: in tmux, a window +after pi's; in herdr, a tab in its workspace. The new pi runs in the folder +the client chose, with this pi's `PI_*` and `PIRC_*` settings. Elsewhere, +or to open it your own way, another pi extension can give the launcher: + +```ts +pi.events.emit("pirc:launcher", { + name: "kitty", + // command is the pi to run; env, the variables to add. + launch: async ({ cwd, command, env }) => { /* open it */ }, +}); +pi.events.emit("pirc:launcher", false); // no launching from this pi +pi.events.emit("pirc:launcher", null); // back to PiRC's own +``` + ## Licence MIT; see `LICENSE`. The bundle includes third-party code, listed in |
