numux 1.12.1 → 1.12.2
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/dist/numux.js +19 -6
- package/package.json +1 -1
package/dist/numux.js
CHANGED
|
@@ -36,7 +36,7 @@ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports,
|
|
|
36
36
|
var require_package = __commonJS((exports, module) => {
|
|
37
37
|
module.exports = {
|
|
38
38
|
name: "numux",
|
|
39
|
-
version: "1.12.
|
|
39
|
+
version: "1.12.2",
|
|
40
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
41
41
|
type: "module",
|
|
42
42
|
license: "MIT",
|
|
@@ -1946,7 +1946,6 @@ class Pane {
|
|
|
1946
1946
|
if (selection?.isActive && !selection.isDragging) {
|
|
1947
1947
|
const text = selection.getSelectedText();
|
|
1948
1948
|
if (text) {
|
|
1949
|
-
renderer.copyToClipboardOSC52(text);
|
|
1950
1949
|
this._onCopy?.(text);
|
|
1951
1950
|
}
|
|
1952
1951
|
}
|
|
@@ -2391,7 +2390,8 @@ class App {
|
|
|
2391
2390
|
async start() {
|
|
2392
2391
|
this.renderer = await createCliRenderer({
|
|
2393
2392
|
exitOnCtrlC: false,
|
|
2394
|
-
useMouse: true
|
|
2393
|
+
useMouse: true,
|
|
2394
|
+
useKittyKeyboard: {}
|
|
2395
2395
|
});
|
|
2396
2396
|
const { width, height } = this.renderer;
|
|
2397
2397
|
const maxNameLen = Math.max(...this.names.map((n) => n.length));
|
|
@@ -2431,7 +2431,10 @@ class App {
|
|
|
2431
2431
|
for (const name of this.names) {
|
|
2432
2432
|
const interactive = this.config.processes[name].interactive === true;
|
|
2433
2433
|
const pane = new Pane(this.renderer, name, termCols, termRows, interactive);
|
|
2434
|
-
pane.onCopy(() =>
|
|
2434
|
+
pane.onCopy((text) => {
|
|
2435
|
+
this.copyToClipboard(text);
|
|
2436
|
+
this.statusBar.showTemporaryMessage("Copied!");
|
|
2437
|
+
});
|
|
2435
2438
|
pane.onScroll(() => {
|
|
2436
2439
|
if (this.searchMode && this.searchMatches.length > 0 && this.activePane === name) {
|
|
2437
2440
|
this.updateSearchHighlights();
|
|
@@ -2481,7 +2484,7 @@ class App {
|
|
|
2481
2484
|
});
|
|
2482
2485
|
this.renderer.keyInput.on("keypress", (key) => {
|
|
2483
2486
|
log(key);
|
|
2484
|
-
if (key.
|
|
2487
|
+
if (key.super && key.name === "c") {
|
|
2485
2488
|
this.copySelection();
|
|
2486
2489
|
return;
|
|
2487
2490
|
}
|
|
@@ -2617,6 +2620,16 @@ class App {
|
|
|
2617
2620
|
this.tabBar.setInputWaiting(name, false);
|
|
2618
2621
|
}
|
|
2619
2622
|
}
|
|
2623
|
+
copyToClipboard(text) {
|
|
2624
|
+
this.renderer.copyToClipboardOSC52(text);
|
|
2625
|
+
const cmd = process.platform === "darwin" ? "pbcopy" : process.platform === "linux" ? "xclip -selection clipboard" : null;
|
|
2626
|
+
if (cmd) {
|
|
2627
|
+
const [bin, ...args] = cmd.split(" ");
|
|
2628
|
+
const proc = Bun.spawn([bin, ...args], { stdin: "pipe" });
|
|
2629
|
+
proc.stdin.write(text);
|
|
2630
|
+
proc.stdin.end();
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2620
2633
|
copySelection() {
|
|
2621
2634
|
const selection = this.renderer.getSelection();
|
|
2622
2635
|
if (!selection?.isActive)
|
|
@@ -2624,7 +2637,7 @@ class App {
|
|
|
2624
2637
|
const text = selection.getSelectedText();
|
|
2625
2638
|
if (!text)
|
|
2626
2639
|
return false;
|
|
2627
|
-
this.
|
|
2640
|
+
this.copyToClipboard(text);
|
|
2628
2641
|
this.renderer.clearSelection();
|
|
2629
2642
|
this.statusBar.showTemporaryMessage("Copied!");
|
|
2630
2643
|
return true;
|