Skip to content

Instantly share code, notes, and snippets.

@nberlette
Forked from pythoninthegrass/starship.toml
Created June 2, 2022 23:36
Show Gist options
  • Save nberlette/158c567980646d568669f9382c4c576f to your computer and use it in GitHub Desktop.
Save nberlette/158c567980646d568669f9382c4c576f 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 = 1000
# 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
[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