diff --git a/setup.sh b/setup.sh index b8a0eee..e5f2195 100755 --- a/setup.sh +++ b/setup.sh @@ -606,6 +606,22 @@ if command -v starship >/dev/null 2>&1 && [[ ! -f "$HOME/.config/starship.toml" starship preset tokyo-night -o "$HOME/.config/starship.toml" \ || warn "Could not apply the preset (starship still installed)." fi + +# bashrc wiring — ONLY when dotfiles were not cloned: on machines that +# use fedora-dots, .bashrc is owned by the dots and must not be edited +# here. Also requires starship to actually be present (a missing binary +# would make every shell print an error from the eval line). +if [[ "$DOTFILES" != "true" ]] \ + && command -v starship >/dev/null 2>&1 \ + && ! grep -q "starship init" "$HOME/.bashrc" 2>/dev/null; then + info "Wiring starship into ~/.bashrc..." + cat >> "$HOME/.bashrc" <<'EOF' + +# starship +export STARSHIP_CONFIG="$HOME/.config/starship.toml" +eval "$(starship init bash)" +EOF +fi pause_if_debug # --- 8.3 RobotoMono Nerd Font (the modules install JetBrainsMono) ---