Skip to content

Instantly share code, notes, and snippets.

@tforster
Last active January 10, 2026 21:37
Show Gist options
  • Select an option

  • Save tforster/a7a1fb4bec4f82a62a8bdd79a65c723b to your computer and use it in GitHub Desktop.

Select an option

Save tforster/a7a1fb4bec4f82a62a8bdd79a65c723b to your computer and use it in GitHub Desktop.
starship configuration
"$schema" = 'https://starship.rs/config-schema.json'
add_newline = true
# Define the palette at the top for easy editing
palette = "high_contrast"
# THE FORMAT STRING
# 1. We start with the opening separator. We use fg:color_user_bg to match the start of the user block.
# We do NOT set bg:nothing (which breaks it). We just leave bg undefined (transparent).
format = """
[](fg:color_user_bg)\
$username\
[](bg:color_host_bg fg:color_user_bg)\
$hostname\
[](bg:color_dir_bg fg:color_host_bg)\
$directory\
[](fg:color_dir_bg bg:color_git_bg)\
$git_branch\
$git_status\
[](fg:color_git_bg)\
"""
[palettes.high_contrast]
color_user_bg = "#d7af00" # Gold
color_user_fg = "#000000" # Black
color_host_bg = "#d7af00" # Gold (Matches user)
color_host_fg = "#000000" # Black
color_dir_bg = "#005fd7" # Bright Blue
color_dir_fg = "#ffffff" # White
color_git_bg = "#28C840" # Bright Green
color_git_fg = "#000000" # Black
color_root_bg = "#ff0000" # Red
# 1. USERNAME MODULE
[username]
show_always = true
style_user = "bg:color_user_bg fg:color_user_fg"
style_root = "bg:color_root_bg fg:#ffffff"
format = '[ $user ]($style)'
# 2. HOSTNAME MODULE
[hostname]
ssh_only = false
style = "bg:color_host_bg fg:color_host_fg"
format = '[@$hostname ]($style)'
trim_at = "."
# 3. DIRECTORY MODULE
[directory]
style = "bg:color_dir_bg fg:color_dir_fg"
format = '[ $path ]($style)'
truncation_length = 3
truncation_symbol = "…/"
# 4. GIT BRANCH MODULE
[git_branch]
symbol = ""
style = "bg:color_git_bg fg:color_git_fg"
format = '[ $symbol $branch ]($style)'
# 5. GIT STATUS MODULE
[git_status]
style = "bg:color_git_bg fg:color_git_fg"
format = '[$all_status$ahead_behind ]($style)'
conflicted = "🏳"
ahead = "⇡"
behind = "⇣"
diverged = "⇕"
up_to_date = ""
untracked = "🤷"
stashed = "📦"
modified = "📝"
staged = "[++($count)](bg:color_git_bg fg:color_git_fg)"
renamed = "👅"
deleted = "🗑"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment