Skip to content

Instantly share code, notes, and snippets.

@ryo-ARAKI
Last active March 12, 2026 02:14
Show Gist options
  • Select an option

  • Save ryo-ARAKI/48a11585299f9032fa4bda60c9bba593 to your computer and use it in GitHub Desktop.

Select an option

Save ryo-ARAKI/48a11585299f9032fa4bda60c9bba593 to your computer and use it in GitHub Desktop.
Starship configuration file
# ~/.config/starship.toml
# NOTE: Emojis with variation selectors or unstable display widths may cause prompt rendering glitches.
# Examples include ⚔️ 🏎️ 🗃️ 🗑️ ✒️
# If layout breaks, prefer colourful emojis without variation selectors.
format = """
$username$hostname$directory$git_branch$git_commit$git_state$git_metrics$git_status$julia$python$rust$conda$direnv$fill$memory_usage$cmd_duration$battery$time
$character"""
# Switch palettes here: ocean_workshop | amber_console | cool_minimal
palette = "amber_console"
[palettes.ocean_workshop]
directory = "cyan"
git_branch = "blue"
git_state = "red"
runtime = "green"
warning = "yellow"
muted = "bright-black"
accent = "bright-white"
added = "green"
deleted = "red"
[palettes.amber_console]
directory = "yellow"
git_branch = "cyan"
git_state = "red"
runtime = "yellow"
warning = "208"
muted = "bright-black"
accent = "white"
added = "green"
deleted = "red"
[palettes.cool_minimal]
directory = "white"
git_branch = "cyan"
git_state = "red"
runtime = "green"
warning = "yellow"
muted = "bright-black"
accent = "bright-white"
added = "green"
deleted = "red"
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = "⚡"
[[battery.display]]
threshold = 30
style = "bold git_state"
[character]
error_symbol = "[✖](bold red) "
[cmd_duration]
min_time = 10_000 # Show command duration over 10,000 milliseconds (=10 sec)
format = " took [$duration]($style)"
style = "bold warning"
[conda]
format = '[$symbol$environment](dimmed green) '
[directory]
fish_style_pwd_dir_length = 2
format = "[$path]($style)[$lock_symbol]($lock_style)"
style = "bold directory"
[direnv]
disabled = false
format = "[$symbol$loaded]($style) "
symbol = "env "
style = "muted"
[fill]
symbol = " "
[git_branch]
format = " on [$symbol$branch]($style) "
symbol = "🍣 "
style = "bold git_branch"
[git_commit]
commit_hash_length = 8
style = "bold accent"
[git_state]
format = "[[$state( $progress_current/$progress_total)]]($style) "
style = "bold git_state"
[git_metrics]
disabled = false
format = "([+$added]($added_style) )([-$deleted]($deleted_style) )"
added_style = "bold added"
deleted_style = "bold deleted"
only_nonzero_diffs = true
[git_status]
conflicted = "🥊 "
ahead = "🚗 ×${count} "
behind = "🐢 ×${count} "
diverged = "🔱 🚗 ×${ahead_count} 🐢 ×${behind_count} "
untracked = "📭 ×${count} "
stashed = "📦 ×${count} "
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 muted"
disabled = false
[julia]
format = "[$symbol$version]($style) "
symbol = "ஃ "
style = "bold runtime"
[memory_usage]
format = "$symbol[${ram}( | ${swap})]($style) "
threshold = 70
style = "bold muted"
disabled = false
[package]
disabled = true
[python]
format = "[${symbol}${pyenv_prefix}(${version} )(\\($virtualenv\\) )]($style) "
style = "bold runtime"
detect_env_vars = []
[rust]
format = "[$symbol$version]($style) "
style = "bold runtime"
[time]
time_format = "%R"
format = "🕙 $time($style) "
style = "accent"
disabled = false
[typst]
format = "[$symbol($version)]($style)"
symbol = "📘 "
style = "bold #239dae"
[username]
style_user = "bold dimmed blue"
show_always = false
[nodejs]
format = "via [🤖 $version](bold green) "
disabled = true
@avizyt
Copy link

avizyt commented Apr 8, 2023

How to change the region value of the prompt?

@deepanchal
Copy link

deepanchal commented Apr 8, 2023

@avizyt

How to change the region value of the prompt?

From starship docs:

The aws module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the AWS_REGION, AWS_DEFAULT_REGION, and AWS_PROFILE env vars and the ~/.aws/config and ~/.aws/credentials files as required.

I have a default region set in my ~/.aws/config

# example config

[default]
sso_session = my-sso
sso_account_id = 111122223333
sso_role_name = readOnly
region = us-west-2 # <-- starship uses this
output = text

[profile user1]
sso_session = my-sso
sso_account_id = 444455556666
sso_role_name = readOnly
region = us-east-1
output = json

[sso-session my-sso]
sso_region = us-east-1
sso_start_url = https://my-sso-portal.awsapps.com/start
sso_registration_scopes = sso:account:access

Check this out for more details: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

@deepanchal
Copy link

@omaru-ok

ayo anyone . i want my starship something like this what i put for that smiling face?

i.redd.it/zxuhsf790in91.png

Adding this to your starship config (~/.config/starship.toml) should give you :) / :( in your prompt.

[character]
success_symbol = '[:\)](green)' # The 'success_symbol' segment is being set to ':)' with the color 'green'
error_symbol = '[:\(](red)' # The 'error_symbol' segment is being set to ':(' with the color 'red'

image

@NormTurtle
Copy link

damn

@avizyt
Copy link

avizyt commented Apr 18, 2023

@avizyt

How to change the region value of the prompt?

From starship docs:

The aws module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the AWS_REGION, AWS_DEFAULT_REGION, and AWS_PROFILE env vars and the ~/.aws/config and ~/.aws/credentials files as required.

I have a default region set in my ~/.aws/config

# example config

[default]
sso_session = my-sso
sso_account_id = 111122223333
sso_role_name = readOnly
region = us-west-2 # <-- starship uses this
output = text

[profile user1]
sso_session = my-sso
sso_account_id = 444455556666
sso_role_name = readOnly
region = us-east-1
output = json

[sso-session my-sso]
sso_region = us-east-1
sso_start_url = https://my-sso-portal.awsapps.com/start
sso_registration_scopes = sso:account:access

Check this out for more details: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

Thank you.

@SanjidChowdhury
Copy link

SanjidChowdhury commented Aug 19, 2023

Hi, how can i make it so that my directory shows like "Dashboard > resources" instead of "Dashboard/resources"? I am using the nerd-font-symbols preset. Also, as this is in VSCode, I want to show the full directory to "Dashboard". Putting the code in the config below does not work.

[directory]
truncation_length = 0
read_only = " 󰌾"

image

@muscaiu
Copy link

muscaiu commented Nov 18, 2023

[nodejs] format = 'via [🤖 $version](bold green) '

it will show the git status, but not the Node version

Any idea why?

Screenshot 2023-11-18 at 16 07 55

@plsnotracking
Copy link

Hi,

Thank you for sharing this, I'm pretty new to starship. I've moved from basic .zsh terminal to starship.

I wanted to port my .zshrc configuration to starship, couldn't find proper documentation to follow.

Kind of looking for equivalents of doing aliases. For example:

## cat
alias bat='bat --theme=ansi-dark'
command -v bat > /dev/null && alias cat='bat --pager=never'

## du
command -v dust > /dev/null && alias du='dust'

## find
command -v fd > /dev/null && alias find='fd'

## fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

## git aliases and functions
source $HOME/.config/zsh/git.zsh

## history
source $HOME/.config/zsh/history.zsh

Thank you.

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