batipanel 0.4.0 → 0.4.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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
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; auto-fallback to htop/top for small panes
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
- local pw ph
82
- pw=$(tmux display-message -t "$pane" -p '#{pane_width}' 2>/dev/null || echo 0)
83
- ph=$(tmux display-message -t "$pane" -p '#{pane_height}' 2>/dev/null || echo 0)
84
- if has_cmd btop && (( pw >= 80 && ph >= 24 )); then
85
- tmux send-keys -t "$pane" "btop" Enter
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 tmux if running
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
- tmux source-file "$BATIPANEL_HOME/config/tmux.conf" 2>/dev/null || true
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "batipanel",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "AI-powered terminal workspace manager — multi-panel tmux layouts with Claude Code, git, monitoring, and more",
5
5
  "bin": {
6
6
  "batipanel": "./bin/cli.sh"