Starship

Starship

The minimal, blazing-fast, and infinitely customizable prompt for any shell!

Official Website

Prerequisites

As you can see on the official website (opens in a new tab), the only requirement is to have a Nerd Font (opens in a new tab) installed to use.I leave the link of the font I normally use.

Caskaydia Cove Nerd Font

Other cool font (the currently I'm using) is MesloLGS, by the way, this font is recommended to install when you run Oh My Zsh with Powerlevel10k on iTerm2. If you want to try you have the download link below. 👇

MesloLGS Font

How to install

Below you can find how to install the Starship on macOS and Linux. If you are a Windows user, please see the instructions on the official website (opens in a new tab).

Linux & macOS

If you are a Linux or a macOS user, you need to run the following command on your terminal:

curl -sS https://starship.rs/install.sh | sh

Setup shell to use Starship

  • Open the Fish configuration file in your IDE;
  • Add the code below on the end of the file.,
~/.config/fish/config.fish
starship init fish | source

Config.File

The configuration file of Starship is located on ~/.config/starship.toml This is a personal choice topic, but I will leave my current configuration, using the Dracula Theme colors.

If you don't waste time with personalization, you can use some of the presets offered by Starship (please visit the link below).

Starship Presets

Dracula Theme

The file below is my configuration using Dracula Theme colors.

Dracula Theme - original config.

~/.config/starship.toml
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
 
# Inserts a blank line between shell prompts
add_newline = true
 
[cmd_duration]
min_time = 4
show_milliseconds = false
disabled = false
format = " 🕙 $duration($style) "
style = "bold #f1fa8c"
 
[character]
error_symbol = "[✕](bold #ff5555)"
success_symbol = "[➜](bold #50fa7b)"
 
[docker_context]
format = "via [$symbol$context]($style) "
symbol="🐳 "
detect_files=["docker-compose.yml", "docker-compose.yaml","docker-compose.dev.yaml", "docker-compose.dev.yml", "Dockerfile"]
detect_folders=["docker"]
 
[aws]
style = "bold #ffb86c"
 
[directory]
style = "bold #50fa7b"
 
[git_branch]
style = "bold #ff79c6"
 
[git_status]
style = "bold #ff5555"
 
[hostname]
style = "bold #bd93f9"
 
[username]
format = "[$user]($style) on "
style_user = "bold #8be9fd"