Skip to content

Instantly share code, notes, and snippets.

@Frankie-B
Forked from pythoninthegrass/starship.toml
Created June 4, 2023 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frankie-B/d85cf2a29b4822253164b28ba8e15aa0 to your computer and use it in GitHub Desktop.
Save Frankie-B/d85cf2a29b4822253164b28ba8e15aa0 to your computer and use it in GitHub Desktop.
Starship prompt setup
# SOURCE: https://starship.rs/config
# DEBUG via: `starship explain`
# Timeout for commands executed by starship (ms)
command_timeout = 500
# Replace the "❯"
[character]
success_symbol = "[λ](green)"
error_symbol = "[λ](red)"
[username]
style_user = "green bold"
style_root = "red bold"
format = "[$user]($style)"
disabled = false
show_always = true
[hostname]
ssh_only = false
format = "[@$hostname](green bold) "
disabled = false
# truncation length works backwards (i.e., cwd > parent > parent ...)
[directory]
truncation_length = 10
truncation_symbol = "…/"
truncate_to_repo = true
[env_var.SHELL]
variable = "SHELL"
default = "unknown shell"
disabled = true
# Show python version starting with venv
[python]
python_binary = ["./venv/bin/python", "python3", "python", "python2"]
[aws]
disabled = true
[docker_context]
disabled = true
[gcloud]
disabled = true
[nodejs]
disabled = true

Setup Starship Prompt

Install Nerd Fonts

brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font

Install Starship

sh -c "$(curl -fsSL https://starship.rs/install.sh)"

Copy config

cp starship.toml ~/.config/starship.toml

Install Shell Color Script

git clone https://gitlab.com/dwt1/shell-color-scripts.git
cd shell-color-scripts
sudo make install

Add to .bashrc

# starship
colorscript -e random # crunch
eval "$(starship init bash)"

Further reading

Starship

Derek Taylor / Shell Color Scripts · GitLab

How to get the most out of your Terminal | by Reagan McFarland | Medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment