Change Bash prompt using Starship

This commit is contained in:
Fabio Scotto di Santolo
2025-10-17 22:02:14 +02:00
parent 846b5541f9
commit 161dc09e25
5 changed files with 420 additions and 15 deletions

View File

@@ -9,7 +9,7 @@ export OSH='/home/fscotto/.oh-my-bash'
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-bash is loaded.
OSH_THEME="robbyrussell"
# OSH_THEME="robbyrussell"
# If you set OSH_THEME to "random", you can ignore themes you don't like.
# OMB_THEME_RANDOM_IGNORED=("powerbash10k" "wanelo")
@@ -78,7 +78,7 @@ OSH_THEME="robbyrussell"
OMB_USE_SUDO=true
# To enable/disable display of Python virtualenv and condaenv
OMB_PROMPT_SHOW_PYTHON_VENV=true # enable
# OMB_PROMPT_SHOW_PYTHON_VENV=true # enable
# OMB_PROMPT_SHOW_PYTHON_VENV=false # disable
# To enable/disable Spack environment information
@@ -178,3 +178,9 @@ alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable
alias userlist="cut -d: -f1 /etc/passwd | sort"
alias ip='ip -color'
alias stow='stow -d $DOTFILES '
# Starship prompt
if command -v starship > /dev/null 2>&1; then
eval "$(starship init bash)"
fi

View File

@@ -8,6 +8,7 @@ function appendpath() {
appendpath "$HOME/.local/bin"
appendpath "$HOME/.cargo/bin"
appendpath "/home/linuxbrew/.linuxbrew/bin"
unset appendpath
# XDG variables
@@ -34,20 +35,21 @@ export HELPDIR=/usr/share/zsh/"${ZSH_VERSION}"/help
# SSH socket
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
export FZF_DEFAULT_COMMAND="fdfind --hidden --type file --strip-cwd-prefix --exclude .git"
export FZF_CTRL_T_COMMAND="fdfind --hidden --type file --strip-cwd-prefix --exclude .git"
export FZF_ALT_C_COMMAND="fdfind --hidden --type directory --strip-cwd-prefix --exclude .git"
# Export Catppuccin Mocha theme for FZF
export FZF_DEFAULT_OPTS=" \
--height 60% --layout=reverse --border \
--color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \
--color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \
--color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \
--color=selected-bg:#45475A \
--color=border:#313244,label:#CDD6F4"
export FZF_TMUX_OPTS=" -p90%,70%"
# export FZF_DEFAULT_COMMAND="fdfind --hidden --type file --strip-cwd-prefix --exclude .git"
# export FZF_CTRL_T_COMMAND="fdfind --hidden --type file --strip-cwd-prefix --exclude .git"
# export FZF_ALT_C_COMMAND="fdfind --hidden --type directory --strip-cwd-prefix --exclude .git"
# # Export Catppuccin Mocha theme for FZF
# export FZF_DEFAULT_OPTS=" \
# --height 60% --layout=reverse --border \
# --color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \
# --color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \
# --color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \
# --color=selected-bg:#45475A \
# --color=border:#313244,label:#CDD6F4"
# export FZF_TMUX_OPTS=" -p90%,70%"
export VIRTUAL_ENV_DISABLE_PROMPT=1
source "$HOME/.profile.d/homebrew.sh"
source "$HOME/.profile.d/mise.sh"
source "$HOME/.profile.d/golang.sh"
source "$HOME/.profile.d/java.sh"

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
if command -v brew > /dev/null 2>&1; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi