batipanel 0.4.0 → 0.4.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/README.md +64 -0
- package/VERSION +1 -1
- package/install.sh +38 -0
- package/lib/layout.sh +12 -6
- package/lib/themes.sh +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,6 +132,69 @@ That's it. The wizard asks 2 questions (screen size + workflow) and sets up your
|
|
|
132
132
|
|
|
133
133
|
## Installation
|
|
134
134
|
|
|
135
|
+
### Complete beginner? Start here
|
|
136
|
+
|
|
137
|
+
**터미널 사용이 처음이거나, npm/Homebrew가 없는 경우** 아래 순서를 따르세요:
|
|
138
|
+
|
|
139
|
+
<details>
|
|
140
|
+
<summary><b>macOS — 처음부터 설치하기</b></summary>
|
|
141
|
+
|
|
142
|
+
1. **Terminal 열기**: `Cmd + Space` → "Terminal" 검색 → 실행
|
|
143
|
+
|
|
144
|
+
2. **설치 명령어 실행** (복사 후 붙여넣기):
|
|
145
|
+
```bash
|
|
146
|
+
git clone https://github.com/batiai/batipanel.git
|
|
147
|
+
cd batipanel
|
|
148
|
+
bash install.sh
|
|
149
|
+
```
|
|
150
|
+
- Homebrew가 없으면 자동으로 설치 안내가 나옵니다
|
|
151
|
+
- 비밀번호를 물어보면 Mac 로그인 비밀번호 입력
|
|
152
|
+
|
|
153
|
+
3. **새 터미널 열기** 후 실행:
|
|
154
|
+
```bash
|
|
155
|
+
b
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
> **npm/npx로 설치하고 싶다면**: 먼저 [nvm](https://github.com/nvm-sh/nvm)을 설치하세요:
|
|
159
|
+
> ```bash
|
|
160
|
+
> curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
161
|
+
> source ~/.zshrc
|
|
162
|
+
> nvm install --lts
|
|
163
|
+
> npx batipanel
|
|
164
|
+
> ```
|
|
165
|
+
|
|
166
|
+
</details>
|
|
167
|
+
|
|
168
|
+
<details>
|
|
169
|
+
<summary><b>Linux / WSL — 처음부터 설치하기</b></summary>
|
|
170
|
+
|
|
171
|
+
1. **터미널 열기**
|
|
172
|
+
|
|
173
|
+
2. **설치 명령어 실행**:
|
|
174
|
+
```bash
|
|
175
|
+
git clone https://github.com/batiai/batipanel.git
|
|
176
|
+
cd batipanel
|
|
177
|
+
bash install.sh
|
|
178
|
+
```
|
|
179
|
+
- 모든 도구(tmux, btop 등)가 자동 설치됩니다
|
|
180
|
+
|
|
181
|
+
3. **새 터미널 열기** 후 실행:
|
|
182
|
+
```bash
|
|
183
|
+
b
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
> **npm/npx로 설치하고 싶다면**: 먼저 [nvm](https://github.com/nvm-sh/nvm)을 설치하세요:
|
|
187
|
+
> ```bash
|
|
188
|
+
> curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
|
189
|
+
> source ~/.bashrc
|
|
190
|
+
> nvm install --lts
|
|
191
|
+
> npx batipanel
|
|
192
|
+
> ```
|
|
193
|
+
|
|
194
|
+
</details>
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
135
198
|
### npm / npx
|
|
136
199
|
|
|
137
200
|
```bash
|
|
@@ -166,6 +229,7 @@ bash install.sh
|
|
|
166
229
|
```
|
|
167
230
|
|
|
168
231
|
The installer auto-detects your package manager (apt, dnf, pacman, brew) and installs everything.
|
|
232
|
+
On macOS without Homebrew, the installer will offer to install it automatically.
|
|
169
233
|
|
|
170
234
|
### Windows (WSL)
|
|
171
235
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.4.
|
|
1
|
+
0.4.2
|
package/install.sh
CHANGED
|
@@ -25,6 +25,44 @@ has_cmd() { command -v "$1" &>/dev/null; }
|
|
|
25
25
|
echo ""
|
|
26
26
|
echo "Checking tools..."
|
|
27
27
|
|
|
28
|
+
# macOS: auto-install Homebrew if missing (required for tmux and other tools)
|
|
29
|
+
if [ "$OS" = "Darwin" ] && ! has_cmd brew; then
|
|
30
|
+
echo ""
|
|
31
|
+
echo "Homebrew is not installed (required for macOS package management)."
|
|
32
|
+
if [ -t 0 ]; then
|
|
33
|
+
printf "Install Homebrew automatically? [Y/n]: "
|
|
34
|
+
read -r yn
|
|
35
|
+
yn="${yn:-Y}"
|
|
36
|
+
if [[ "$yn" =~ ^[Yy] ]]; then
|
|
37
|
+
echo "Installing Homebrew..."
|
|
38
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
39
|
+
# add to PATH for this session (Apple Silicon vs Intel)
|
|
40
|
+
if [ -f /opt/homebrew/bin/brew ]; then
|
|
41
|
+
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
42
|
+
elif [ -f /usr/local/bin/brew ]; then
|
|
43
|
+
eval "$(/usr/local/bin/brew shellenv)"
|
|
44
|
+
fi
|
|
45
|
+
if has_cmd brew; then
|
|
46
|
+
echo "Homebrew installed successfully."
|
|
47
|
+
else
|
|
48
|
+
echo "Homebrew install completed but 'brew' not found in PATH."
|
|
49
|
+
echo " Close and reopen Terminal, then re-run this installer."
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
else
|
|
53
|
+
echo ""
|
|
54
|
+
echo "Homebrew is required on macOS. Install manually:"
|
|
55
|
+
echo " /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""
|
|
56
|
+
echo ""
|
|
57
|
+
echo "Then re-run: bash install.sh"
|
|
58
|
+
exit 1
|
|
59
|
+
fi
|
|
60
|
+
else
|
|
61
|
+
echo " Install Homebrew first: https://brew.sh"
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
fi
|
|
65
|
+
|
|
28
66
|
install_packages() {
|
|
29
67
|
local packages=("$@")
|
|
30
68
|
|
package/lib/layout.sh
CHANGED
|
@@ -74,15 +74,21 @@ run_remote() {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
# Launch system monitor: btop → htop → top
|
|
77
|
-
# btop needs ~80x24 minimum;
|
|
77
|
+
# btop needs ~80x24 minimum; if pane is too small, let user choose
|
|
78
78
|
run_monitor() {
|
|
79
79
|
local pane="$1"
|
|
80
80
|
label_pane "$pane" "Monitor"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
if has_cmd btop; then
|
|
82
|
+
local pw ph
|
|
83
|
+
pw=$(tmux display-message -t "$pane" -p '#{pane_width}' 2>/dev/null || echo 0)
|
|
84
|
+
ph=$(tmux display-message -t "$pane" -p '#{pane_height}' 2>/dev/null || echo 0)
|
|
85
|
+
if (( pw >= 80 && ph >= 24 )); then
|
|
86
|
+
tmux send-keys -t "$pane" "btop" Enter
|
|
87
|
+
else
|
|
88
|
+
# pane too small for btop — let user choose
|
|
89
|
+
tmux send-keys -t "$pane" \
|
|
90
|
+
"echo 'Pane is ${pw}x${ph} (btop needs 80x24)' && echo '' && echo ' 1) btop (force — or zoom with Alt+f first)' && echo ' 2) htop' && echo ' 3) top' && echo '' && printf 'Choose [1]: ' && read -r _c && case \${_c:-1} in 2) htop;; 3) top;; *) btop;; esac" Enter
|
|
91
|
+
fi
|
|
86
92
|
elif has_cmd htop; then
|
|
87
93
|
tmux send-keys -t "$pane" "htop" Enter
|
|
88
94
|
elif has_cmd top; then
|
package/lib/themes.sh
CHANGED
|
@@ -31,9 +31,9 @@ _apply_theme() {
|
|
|
31
31
|
echo "BATIPANEL_THEME=\"$theme\"" > "$TMUX_CONFIG"
|
|
32
32
|
fi
|
|
33
33
|
|
|
34
|
-
# live reload
|
|
34
|
+
# live reload: apply theme overlay to all running tmux servers
|
|
35
35
|
if command -v tmux &>/dev/null && tmux list-sessions &>/dev/null 2>&1; then
|
|
36
|
-
|
|
36
|
+
# source theme.conf directly (not tmux.conf which reloads defaults first)
|
|
37
37
|
tmux source-file "$BATIPANEL_HOME/config/theme.conf" 2>/dev/null || true
|
|
38
38
|
fi
|
|
39
39
|
|