betterterm 1.0.0 → 1.0.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/bin/cli.js CHANGED
@@ -71,6 +71,22 @@ log("Homebrew found");
71
71
 
72
72
  heading("Installing dependencies...");
73
73
 
74
+ // Ghostty (cask)
75
+ if (run("brew list --cask ghostty")) {
76
+ log("ghostty already installed");
77
+ } else {
78
+ console.log(" Installing Ghostty...");
79
+ const result = spawnSync("brew", ["install", "--cask", "ghostty"], {
80
+ stdio: "inherit",
81
+ });
82
+ if (result.status !== 0) {
83
+ warn("Ghostty installation failed — install manually: https://ghostty.org");
84
+ } else {
85
+ log("ghostty installed");
86
+ }
87
+ }
88
+
89
+ // CLI tools
74
90
  const brewDeps = ["tmux", "yazi"];
75
91
  for (const dep of brewDeps) {
76
92
  if (which(dep)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "betterterm",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Terminal IDE setup: Ghostty + tmux + yazi + carbonyl browser",
5
5
  "bin": {
6
6
  "betterterm": "bin/cli.js"
@@ -1,6 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Start tmux with just a terminal (no file explorer)
3
- TMUX=$(which tmux)
3
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
4
+ TMUX=$(command -v tmux)
4
5
 
5
6
  # Use first argument as starting dir, or current dir, or home
6
7
  DIR="${1:-${PWD:-$HOME}}"
@@ -1,6 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Open URL bar — kills current browser and prompts for new URL
3
- T=$(which tmux)
3
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
4
+ T=$(command -v tmux)
4
5
  $T kill-window -t browser 2>/dev/null
5
6
  $T command-prompt -p "URL:" "run-shell \"~/.local/bin/open-browser.sh '%%'\""
6
7
  exit 0
@@ -1,5 +1,6 @@
1
1
  #!/bin/bash
2
2
  # Close the browser window
3
- T=$(which tmux)
3
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
4
+ T=$(command -v tmux)
4
5
  $T kill-window -t browser 2>/dev/null
5
6
  exit 0
@@ -1,6 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Open carbonyl with auto https://
3
- T=$(which tmux)
3
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
4
+ T=$(command -v tmux)
4
5
  CARBONYL_DIR="$HOME/.local/lib/node_modules/carbonyl/node_modules/@fathyb/carbonyl-macos-arm64/build"
5
6
 
6
7
  URL="$1"
@@ -1,6 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Toggle carbonyl browser as a full tmux window
3
- T=$(which tmux)
3
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
4
+ T=$(command -v tmux)
4
5
  CARBONYL_DIR="$HOME/.local/lib/node_modules/carbonyl/node_modules/@fathyb/carbonyl-macos-arm64/build"
5
6
 
6
7
  # Check if browser window exists
@@ -1,12 +1,13 @@
1
1
  #!/bin/bash
2
2
  # Toggle yazi file explorer pane in tmux
3
- T=$(which tmux)
3
+ export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
4
+ T=$(command -v tmux)
4
5
  pane_count=$($T display-message -p '#{window_panes}')
5
6
  if [ "$pane_count" -gt 1 ]; then
6
7
  $T kill-pane -t {right}
7
8
  else
8
9
  DIR=$($T display-message -p '#{pane_current_path}')
9
- $T split-window -h -l 30% -c "$DIR" "env TERM=xterm-256color $(which yazi) $DIR"
10
+ $T split-window -h -l 30% -c "$DIR" "env TERM=xterm-256color $(command -v yazi) $DIR"
10
11
  $T select-pane -t 0
11
12
  fi
12
13
  exit 0