@jx0/jmux 0.5.3 → 0.6.0
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/README.md +3 -1
- package/config/welcome.sh +44 -0
- package/package.json +1 -1
- package/src/main.ts +25 -7
package/README.md
CHANGED
|
@@ -22,7 +22,9 @@ bun install -g @jx0/jmux
|
|
|
22
22
|
jmux
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Requires [Bun](https://bun.sh) 1.2+, [tmux](https://github.com/tmux/tmux) 3.2+, [fzf](https://github.com/junegunn/fzf), and optionally [git](https://git-scm.com/) for branch display.
|
|
25
|
+
Requires [Bun](https://bun.sh) 1.2+, [tmux](https://github.com/tmux/tmux) 3.2+, [fzf](https://github.com/junegunn/fzf), and optionally [git](https://git-scm.com/) for branch display. jmux will offer to install tmux and fzf for you on first run.
|
|
26
|
+
|
|
27
|
+
New to tmux? See the **[Getting Started guide](docs/getting-started.md)** — no prior tmux knowledge needed.
|
|
26
28
|
|
|
27
29
|
---
|
|
28
30
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# jmux first-run welcome screen
|
|
3
|
+
# Called via: display-popup -E "welcome.sh"
|
|
4
|
+
|
|
5
|
+
BOLD="\033[1m"
|
|
6
|
+
DIM="\033[2m"
|
|
7
|
+
GREEN="\033[32m"
|
|
8
|
+
YELLOW="\033[33m"
|
|
9
|
+
CYAN="\033[36m"
|
|
10
|
+
RESET="\033[0m"
|
|
11
|
+
|
|
12
|
+
clear
|
|
13
|
+
echo ""
|
|
14
|
+
echo -e " ${GREEN}${BOLD}Welcome to jmux${RESET}"
|
|
15
|
+
echo -e " ${DIM}The terminal workspace for agentic development${RESET}"
|
|
16
|
+
echo ""
|
|
17
|
+
echo -e " ${DIM}────────────────────────────────────────────${RESET}"
|
|
18
|
+
echo ""
|
|
19
|
+
echo -e " ${BOLD}Essential keybindings${RESET}"
|
|
20
|
+
echo ""
|
|
21
|
+
echo -e " ${GREEN}Ctrl-Shift-Up/Down${RESET} Switch between sessions"
|
|
22
|
+
echo -e " ${GREEN}Ctrl-a${RESET} then ${GREEN}n${RESET} New session"
|
|
23
|
+
echo -e " ${GREEN}Ctrl-a${RESET} then ${GREEN}c${RESET} New window (tab)"
|
|
24
|
+
echo -e " ${GREEN}Ctrl-a${RESET} then ${GREEN}|${RESET} Split pane horizontally"
|
|
25
|
+
echo -e " ${GREEN}Ctrl-a${RESET} then ${GREEN}-${RESET} Split pane vertically"
|
|
26
|
+
echo -e " ${GREEN}Shift-Arrow${RESET} Move between panes"
|
|
27
|
+
echo -e " ${GREEN}Ctrl-a${RESET} then ${GREEN}i${RESET} Settings"
|
|
28
|
+
echo ""
|
|
29
|
+
echo -e " ${DIM}────────────────────────────────────────────${RESET}"
|
|
30
|
+
echo ""
|
|
31
|
+
echo -e " ${BOLD}The sidebar${RESET} on the left shows all your sessions."
|
|
32
|
+
echo -e " ${GREEN}●${RESET} Green dot = new output ${YELLOW}!${RESET} Orange = needs review"
|
|
33
|
+
echo -e " Click a session to switch to it."
|
|
34
|
+
echo ""
|
|
35
|
+
echo -e " ${DIM}────────────────────────────────────────────${RESET}"
|
|
36
|
+
echo ""
|
|
37
|
+
echo -e " ${BOLD}Next steps${RESET}"
|
|
38
|
+
echo ""
|
|
39
|
+
echo -e " ${CYAN}1.${RESET} Try ${GREEN}Ctrl-a n${RESET} to create a new session"
|
|
40
|
+
echo -e " ${CYAN}2.${RESET} Run ${GREEN}jmux --install-agent-hooks${RESET} for Claude Code notifications"
|
|
41
|
+
echo -e " ${CYAN}3.${RESET} Full guide: ${DIM}github.com/jarredkenny/jmux/blob/main/docs/getting-started.md${RESET}"
|
|
42
|
+
echo ""
|
|
43
|
+
echo -e " ${DIM}Press any key to start${RESET}"
|
|
44
|
+
read -rsn1
|
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { homedir } from "os";
|
|
|
12
12
|
|
|
13
13
|
// --- CLI commands (run and exit before TUI) ---
|
|
14
14
|
|
|
15
|
-
const VERSION = "0.
|
|
15
|
+
const VERSION = "0.6.0";
|
|
16
16
|
|
|
17
17
|
const HELP = `jmux — the terminal workspace for agentic development
|
|
18
18
|
|
|
@@ -58,12 +58,6 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
|
|
|
58
58
|
process.exit(0);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
if (process.env.JMUX) {
|
|
62
|
-
console.error("Already running inside jmux.");
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
process.env.JMUX = "1";
|
|
66
|
-
|
|
67
61
|
if (process.argv.includes("--install-agent-hooks")) {
|
|
68
62
|
installAgentHooks();
|
|
69
63
|
process.exit(0);
|
|
@@ -122,6 +116,14 @@ function installAgentHooks(): void {
|
|
|
122
116
|
console.log("will show an orange ! on that session.");
|
|
123
117
|
}
|
|
124
118
|
|
|
119
|
+
// --- Nesting guard (after CLI commands, before TUI) ---
|
|
120
|
+
|
|
121
|
+
if (process.env.JMUX) {
|
|
122
|
+
console.error("Already running inside jmux.");
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
process.env.JMUX = "1";
|
|
126
|
+
|
|
125
127
|
// --- TUI startup ---
|
|
126
128
|
|
|
127
129
|
// Read sidebar width from user config, fall back to default
|
|
@@ -686,6 +688,22 @@ async function start(): Promise<void> {
|
|
|
686
688
|
await resolveClientName();
|
|
687
689
|
renderFrame();
|
|
688
690
|
|
|
691
|
+
// First-run welcome screen
|
|
692
|
+
const configDir = resolve(homedir(), ".config", "jmux");
|
|
693
|
+
const configPath = resolve(configDir, "config.json");
|
|
694
|
+
if (!existsSync(configPath)) {
|
|
695
|
+
mkdirSync(configDir, { recursive: true });
|
|
696
|
+
writeFileSync(configPath, JSON.stringify({}, null, 2) + "\n");
|
|
697
|
+
if (!ptyClientName) await resolveClientName();
|
|
698
|
+
if (ptyClientName) {
|
|
699
|
+
const welcomeScript = resolve(jmuxDir, "config", "welcome.sh");
|
|
700
|
+
const args = ["tmux"];
|
|
701
|
+
if (socketName) args.push("-L", socketName);
|
|
702
|
+
args.push("display-popup", "-c", ptyClientName, "-E", "-w", "55%", "-h", "60%", "-b", "heavy", "-S", "fg=#4f565d", welcomeScript);
|
|
703
|
+
Bun.spawn(args, { stdout: "ignore", stderr: "ignore" });
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
689
707
|
// Subscribe to @jmux-attention across all sessions
|
|
690
708
|
await control.registerSubscription(
|
|
691
709
|
"attention",
|