pi-squire 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/README.md +2 -1
- package/package.json +1 -1
- package/src/tmux.ts +15 -4
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.13.1] - 2026-10-27
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- A delegate's popup title names the key that closes it, with your tmux prefix,
|
|
14
|
+
for example `scout-first · C-b d to close`.
|
|
15
|
+
|
|
9
16
|
## [0.13.0] - 2026-10-26
|
|
10
17
|
|
|
11
18
|
### Added
|
|
@@ -513,7 +520,8 @@ author's dotfiles; the changes below are against that copy.
|
|
|
513
520
|
|
|
514
521
|
- The published file list includes `child.ts`, which `index.ts` imports.
|
|
515
522
|
|
|
516
|
-
[Unreleased]: https://github.com/gvanderclay/pi-squire/compare/v0.13.
|
|
523
|
+
[Unreleased]: https://github.com/gvanderclay/pi-squire/compare/v0.13.1...HEAD
|
|
524
|
+
[0.13.1]: https://github.com/gvanderclay/pi-squire/compare/v0.13.0...v0.13.1
|
|
517
525
|
[0.13.0]: https://github.com/gvanderclay/pi-squire/compare/v0.12.0...v0.13.0
|
|
518
526
|
[0.12.0]: https://github.com/gvanderclay/pi-squire/compare/v0.11.0...v0.12.0
|
|
519
527
|
[0.11.0]: https://github.com/gvanderclay/pi-squire/compare/v0.10.0...v0.11.0
|
package/README.md
CHANGED
|
@@ -197,7 +197,8 @@ or done with auto-exit off, newest first. The model has no tool for any of this.
|
|
|
197
197
|
Popup and switch act on the most recently active tmux client attached to the
|
|
198
198
|
parent's session. With none attached they refuse with a notice; peek and close
|
|
199
199
|
still work. The popup attaches to the window's session at that window, and
|
|
200
|
-
detaching in it (`prefix d`) closes it
|
|
200
|
+
detaching in it (`prefix d`) closes it; its title names that key with your
|
|
201
|
+
prefix. When the delegate's window goes, the parent
|
|
201
202
|
closes the popup within one poll (up to 5 s). No tmux key bindings or options are
|
|
202
203
|
added.
|
|
203
204
|
|
package/package.json
CHANGED
package/src/tmux.ts
CHANGED
|
@@ -139,6 +139,19 @@ async function parentSession(run: Run): Promise<Parent | undefined> {
|
|
|
139
139
|
return id.trim() === "" ? undefined : { id: id.trim(), name: name.join("\t"), companion: marker === "1" };
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
/**
|
|
143
|
+
* The key that starts a tmux command, as tmux names it (`C-b`), for the
|
|
144
|
+
* popup's title; `prefix` when it cannot be read or is unset.
|
|
145
|
+
*/
|
|
146
|
+
async function prefixKey(run: Run): Promise<string> {
|
|
147
|
+
try {
|
|
148
|
+
const key = (await run(["show-options", "-gv", "prefix"])).trim();
|
|
149
|
+
return key === "" || key === "None" ? "prefix" : key;
|
|
150
|
+
} catch {
|
|
151
|
+
return "prefix";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
142
155
|
/** How long a launched popup may take to fail before it counts as shown. */
|
|
143
156
|
const POPUP_SETTLE_MS = 300;
|
|
144
157
|
|
|
@@ -282,10 +295,8 @@ function navigation(
|
|
|
282
295
|
if (!/^\$[0-9]+$/.test(sessionId)) throw new Error(`tmux reported an invalid session id for ${window.id}`);
|
|
283
296
|
// Ids are `@N` and `$N` only; quoted so the popup's shell does not expand `$N`.
|
|
284
297
|
const command = `tmux select-window -t '${window.id}' \\; attach-session -t '${sessionId}'`;
|
|
285
|
-
await
|
|
286
|
-
|
|
287
|
-
onExit,
|
|
288
|
-
);
|
|
298
|
+
const title = `${window.name} · ${await prefixKey(run)} d to close`;
|
|
299
|
+
await launchPopup(["display-popup", "-c", client, "-E", "-w", "90%", "-h", "90%", "-T", title, command], onExit);
|
|
289
300
|
},
|
|
290
301
|
|
|
291
302
|
async closePopup(client) {
|