batipanel 0.4.36 → 0.4.38
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 +1 -1
- package/install.sh +1 -1
- package/lib/session.sh +17 -9
- package/package.json +1 -1
- package/scripts/install/fonts.sh +43 -22
- package/scripts/install/shell-rc.sh +3 -2
- package/uninstall.sh +2 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.4.
|
|
1
|
+
0.4.38
|
package/install.sh
CHANGED
|
@@ -145,7 +145,7 @@ fi
|
|
|
145
145
|
|
|
146
146
|
# === activate prompt theme ===
|
|
147
147
|
# don't exec $SHELL — it breaks /dev/tty when run from curl|bash or subshells
|
|
148
|
-
if [ -z "${npm_lifecycle_event:-}" ]; then
|
|
148
|
+
if [ -z "${npm_lifecycle_event:-}" ] && [ -z "${BATIPANEL_WEB_INSTALL:-}" ]; then
|
|
149
149
|
echo ""
|
|
150
150
|
echo -e " \033[2m───────────────────────────────────\033[0m"
|
|
151
151
|
echo -e " \033[1mNext step\033[0m \033[2m— activate your shell:\033[0m"
|
package/lib/session.sh
CHANGED
|
@@ -143,21 +143,29 @@ tmux_reset() {
|
|
|
143
143
|
echo " Removed $cleaned stale socket(s)"
|
|
144
144
|
fi
|
|
145
145
|
|
|
146
|
-
# 3. remove registered projects
|
|
146
|
+
# 3. remove registered projects (with confirmation)
|
|
147
147
|
local proj_count=0
|
|
148
148
|
for f in "$BATIPANEL_HOME"/projects/*.sh; do
|
|
149
149
|
[ -f "$f" ] || continue
|
|
150
150
|
proj_count=$((proj_count + 1))
|
|
151
151
|
done
|
|
152
152
|
if (( proj_count > 0 )); then
|
|
153
|
-
|
|
154
|
-
echo "
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
153
|
+
echo ""
|
|
154
|
+
echo -e " ${YELLOW}This will delete $proj_count registered project(s) and config.${NC}"
|
|
155
|
+
printf " Continue? [y/N]: "
|
|
156
|
+
local _reset_answer=""
|
|
157
|
+
read -r _reset_answer
|
|
158
|
+
if [[ "${_reset_answer:-N}" == [yY] ]]; then
|
|
159
|
+
rm -f "$BATIPANEL_HOME"/projects/*.sh
|
|
160
|
+
echo " Removed $proj_count registered project(s)"
|
|
161
|
+
# 4. remove config (wizard will re-run)
|
|
162
|
+
if [ -f "$BATIPANEL_HOME/config.sh" ]; then
|
|
163
|
+
rm -f "$BATIPANEL_HOME/config.sh"
|
|
164
|
+
echo " Removed config.sh (wizard will re-run)"
|
|
165
|
+
fi
|
|
166
|
+
else
|
|
167
|
+
echo " Skipped project/config cleanup"
|
|
168
|
+
fi
|
|
161
169
|
fi
|
|
162
170
|
|
|
163
171
|
# 5. test tmux
|
package/package.json
CHANGED
package/scripts/install/fonts.sh
CHANGED
|
@@ -40,9 +40,24 @@ setup_fonts_and_terminal() {
|
|
|
40
40
|
# install Nerd Font via Homebrew
|
|
41
41
|
if command -v brew &>/dev/null; then
|
|
42
42
|
if ! brew list --cask font-meslo-lg-nerd-font &>/dev/null 2>&1; then
|
|
43
|
-
echo "Installing Nerd Font (MesloLGS NF) for powerline glyphs..."
|
|
44
|
-
|
|
43
|
+
echo " Installing Nerd Font (MesloLGS NF) for powerline glyphs..."
|
|
44
|
+
# ensure cask-fonts tap is available (older brew needs manual tap)
|
|
45
|
+
if ! brew tap | grep -q "homebrew/cask-fonts" 2>/dev/null; then
|
|
46
|
+
brew tap homebrew/cask-fonts 2>/dev/null || true
|
|
47
|
+
fi
|
|
48
|
+
if brew install --cask font-meslo-lg-nerd-font; then
|
|
49
|
+
echo " Nerd Font installed"
|
|
50
|
+
else
|
|
51
|
+
echo " Warning: Nerd Font install via brew failed."
|
|
52
|
+
echo " Try manually: brew install --cask font-meslo-lg-nerd-font"
|
|
53
|
+
fi
|
|
54
|
+
else
|
|
55
|
+
echo " Nerd Font already installed"
|
|
45
56
|
fi
|
|
57
|
+
else
|
|
58
|
+
echo " Warning: Homebrew not found — cannot install Nerd Font automatically."
|
|
59
|
+
echo " Install manually: https://github.com/ryanoasis/nerd-fonts/releases"
|
|
60
|
+
echo " Look for 'MesloLGS Nerd Font' and install the .ttf files."
|
|
46
61
|
fi
|
|
47
62
|
|
|
48
63
|
# auto-configure Apple Terminal: create/update "batipanel" profile
|
|
@@ -140,28 +155,34 @@ APPLESCRIPT
|
|
|
140
155
|
# already using batipanel profile — update it silently
|
|
141
156
|
_setup_bp_profile
|
|
142
157
|
else
|
|
143
|
-
# first install or different profile
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
echo " - Nerd Font (MesloLGS) for powerline glyphs"
|
|
148
|
-
echo " - Dark theme colors"
|
|
149
|
-
echo ""
|
|
150
|
-
printf " Apply batipanel Terminal profile? [Y/n] "
|
|
151
|
-
_bp_answer=""
|
|
152
|
-
if [ -t 0 ]; then
|
|
153
|
-
read -r _bp_answer
|
|
158
|
+
# first install or different profile
|
|
159
|
+
if [ -n "${npm_lifecycle_event:-}" ]; then
|
|
160
|
+
# npm/npx: non-interactive, auto-apply
|
|
161
|
+
_setup_bp_profile
|
|
154
162
|
else
|
|
155
|
-
|
|
163
|
+
# interactive: ask user
|
|
164
|
+
echo ""
|
|
165
|
+
echo " Apple Terminal detected (current profile: ${_current_profile})"
|
|
166
|
+
echo " batipanel can create a dedicated '${_bp_profile}' profile with:"
|
|
167
|
+
echo " - Nerd Font (MesloLGS) for powerline glyphs"
|
|
168
|
+
echo " - Dark theme colors"
|
|
169
|
+
echo ""
|
|
170
|
+
printf " Apply batipanel Terminal profile? [Y/n] "
|
|
171
|
+
_bp_answer=""
|
|
172
|
+
if [ -t 0 ]; then
|
|
173
|
+
read -r _bp_answer
|
|
174
|
+
else
|
|
175
|
+
read -r _bp_answer < /dev/tty 2>/dev/null || _bp_answer="y"
|
|
176
|
+
fi
|
|
177
|
+
case "$_bp_answer" in
|
|
178
|
+
[nN]*)
|
|
179
|
+
echo " Skipped. You can set your font to a Nerd Font manually."
|
|
180
|
+
;;
|
|
181
|
+
*)
|
|
182
|
+
_setup_bp_profile
|
|
183
|
+
;;
|
|
184
|
+
esac
|
|
156
185
|
fi
|
|
157
|
-
case "$_bp_answer" in
|
|
158
|
-
[nN]*)
|
|
159
|
-
echo " Skipped. You can set your font to a Nerd Font manually."
|
|
160
|
-
;;
|
|
161
|
-
*)
|
|
162
|
-
_setup_bp_profile
|
|
163
|
-
;;
|
|
164
|
-
esac
|
|
165
186
|
fi
|
|
166
187
|
fi
|
|
167
188
|
fi
|
|
@@ -155,8 +155,9 @@ fi
|
|
|
155
155
|
STAR_EOF
|
|
156
156
|
fi
|
|
157
157
|
|
|
158
|
-
# === register npm download (
|
|
158
|
+
# === register npm download (ping only, no actual install) ===
|
|
159
|
+
# just fetch the package metadata to count as a download on npmjs.com
|
|
159
160
|
if command -v npm &>/dev/null; then
|
|
160
|
-
npm
|
|
161
|
+
npm view batipanel version &>/dev/null &
|
|
161
162
|
fi
|
|
162
163
|
}
|
package/uninstall.sh
CHANGED
|
@@ -62,6 +62,8 @@ for rc in "$HOME/.zshrc" "$HOME/.bashrc" "$HOME/.bash_profile" "$HOME/.profile";
|
|
|
62
62
|
_sed_i '/zsh-prompt\.zsh/d' "$rc"
|
|
63
63
|
_sed_i '/# batipanel shell theme/d' "$rc"
|
|
64
64
|
_sed_i '/# batipanel prompt theme/d' "$rc"
|
|
65
|
+
# welcome/star block (heredoc inserted by installer)
|
|
66
|
+
_sed_i '/# batipanel welcome/,/^fi$/d' "$rc"
|
|
65
67
|
# completion lines
|
|
66
68
|
_sed_i '/completions\/batipanel/d' "$rc"
|
|
67
69
|
_sed_i '/_batipanel/d' "$rc"
|