Starship

Starship gives you a fast, cross-shell, highly customizable prompt that surfaces useful context (git, runtime, time, etc.) in a clean, minimal UI.

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

> Please follow the steps for your shell to complete the installation:
  bash
  Add the following to the end of ~/.bashrc:
 
        eval "$(starship init bash)"
        
  fish
  Add the following to the end of ~/.config/fish/config.fish:
 
        starship init fish | source
        
  nushell
  Warning This will change in the future.
  Only Nushell v0.96 or higher is supported.
  And add the following to the end of your nu config file (find it by running $nu.config-path in Nushell):
 
        mkdir ($nu.data-dir | path join "vendor/autoload")
        starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")

Configuration

mkdir -p ~/.config && touch ~/.config/starship.toml

https://gist.github.com/ryo-ARAKI/48a11585299f9032fa4bda60c9bba593

# ~/.config/starship.toml
 
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = "⚡"
 
[[battery.display]]
threshold = 30
style = "bold red"
 
[character]
error_symbol = "[✖](bold red) "
 
[cmd_duration]
min_time = 10_000  # Show command duration over 10,000 milliseconds (=10 sec)
format = " took [$duration]($style)"
 
[directory]
truncation_length = 5
format = "[$path]($style)[$lock_symbol]($lock_style)"
 
[git_branch]
format = " [$symbol$branch]($style) "
symbol = "🍣 "
style = "bold yellow"
 
[git_commit]
commit_hash_length = 8
style = "bold white"
 
[git_state]
format = '[\($state( $progress_current of $progress_total)\)]($style) '
 
[git_status]
conflicted = "⚔️ "
ahead = "🏎️ 💨 ×${count} "
behind = "🐢 ×${count} "
diverged = "🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count} "
untracked = "🛤️  ×${count} "
stashed = "📦 "
modified = "📝 ×${count} "
staged = "🗃️  ×${count} "
renamed = "📛 ×${count} "
deleted = "🗑️  ×${count} "
style = "bright-white"
format = "$all_status$ahead_behind"
 
[hostname]
ssh_only = true
format = "[$hostname]($style)"
trim_at = "-"
style = "bold dimmed white"
disabled = false
 
[julia]
format = "[$symbol$version]($style) "
symbol = "ஃ "
style = "bold green"
 
[memory_usage]
format = "$symbol[${ram}( | ${swap})]($style) "
threshold = 70
style = "bold dimmed white"
disabled = false
 
[package]
disabled = true
 
[python]
format = "[$symbol$version]($style) "
style = "bold green"
 
[rust]
format = "[$symbol$version]($style) "
style = "bold green"
 
[time]
time_format = "%T"
format = "🕙 $time($style) "
style = "bright-white"
disabled = false
 
[typst]
format = "[$symbol($version)]($style)"
style = "bold #239dae"
 
[username]
style_user = "bold dimmed blue"
show_always = false
 
[nodejs]
format = "via [🤖 $version](bold green) "