Skip to content

Instantly share code, notes, and snippets.

@NostraDavid
Last active March 22, 2025 15:54
Show Gist options
  • Save NostraDavid/675a0706716b98816fd2809560ffe42c to your computer and use it in GitHub Desktop.
Save NostraDavid/675a0706716b98816fd2809560ffe42c to your computer and use it in GitHub Desktop.
~/.config/starship.toml - based on powerline-status + powerline-gitstatus
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# `prev_bg` is a special variable that sets the background color to the previous
# module's background color, which is useful for creating a seamless transition between
# modules. For example, you can use it to create a seamless transition between the
# `directory` and `git_branch` modules.
# You can also override fg and bg colors for each module. `fg:prev_bg fg:light_bg` means
# that the foreground color is the previous module's background color, but if there is
# no previous module, it will be the light_bg color. The same logic applies to the
# background color.
# == current prompt ==
format = """
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$directory\
$python\
$status\
$character\
"""
# == prompt settings ==
# https://starship.rs/config/#prompt
add_newline = false
command_timeout = 500
palette = 'powerline_status'
[palettes.powerline_status]
term_bg = '#1e1e1e'
dark_bg = '#303030'
light_bg = '#585858'
pyth = '#26b446' # green
stat = '#d75f00' # orange
# git_status colors
orange = '#ffaf00'
darkblue = '#005faf'
brightestorange = '#ffaf00'
mediumorange = '#ff8700'
# == current prompt settings ==
[git_branch]
style = 'bg:dark_bg'
format = '[$symbol $branch]($style)'
symbol = ''
truncation_length = 12
truncation_symbol = ''
only_attached = true
[git_commit]
style = 'purple bg:dark_bg'
format = '[ $tag$hash]($style)'
tag_symbol = '🔖 '
tag_disabled = false
only_detached = true
[git_state]
style = 'bg:dark_bg'
format = '\([$state( $progress_current/$progress_total)]($style)\) '
# [git_status]
# style = 'bg:dark_bg'
# format = '[ $all_status$ahead_behind ]($style)'
# -  : branch name or commit hash
# - ★ : most recent tag (if enabled)
# - ↓ : n commits behind
# - ↑ : n commits ahead
# - ● : n staged files
# - ✖ : n unmerged files (conflicts)
# - ✚ : n changed files
# - … : n untracked files
# - ⚑ : n stashed files
# "gitstatus": { "fg": "gray8", "bg": "gray2", "attrs": [] },
# "gitstatus_branch": { "fg": "gray8", "bg": "gray2", "attrs": [] },
# "gitstatus_branch_clean": { "fg": "green", "bg": "gray2", "attrs": [] },
# "gitstatus_branch_dirty": { "fg": "gray8", "bg": "gray2", "attrs": [] },
# "gitstatus_branch_detached": { "fg": "mediumpurple", "bg": "gray2", "attrs": [] },
# "gitstatus_behind": { "fg": "gray10", "bg": "gray2", "attrs": [] },
# "gitstatus_ahead": { "fg": "gray10", "bg": "gray2", "attrs": [] },
# "gitstatus_staged": { "fg": "green", "bg": "gray2", "attrs": [] },
# "gitstatus_unmerged": { "fg": "brightred", "bg": "gray2", "attrs": [] },
# "gitstatus_changed": { "fg": "mediumorange", "bg": "gray2", "attrs": [] },
# "gitstatus_untracked": { "fg": "brightestorange", "bg": "gray2", "attrs": [] },
# "gitstatus_stashed": { "fg": "darkblue", "bg": "gray2", "attrs": [] }
[git_status]
style = 'bg:dark_bg'
format = """[ \
$conflicted\
$stashed\
$deleted\
$renamed\
$modified\
$typechanged\
$staged\
$untracked\
$ahead_behind\
$ahead_count\
$behind_count ]($style)\
"""
up_to_date = ''
behind = '[↓ ${count}](fg:white bg:prev_bg) '
ahead = '[↑ ${count}](fg:white bg:prev_bg) '
staged = '[● ${count}](fg:green bg:prev_bg) '
deleted = '[✖ ${count}](fg:red bg:prev_bg) '
renamed = '[➜ ${count}](fg:purple bg:prev_bg) '
stashed = '[⚑ ${count}](fg:darkblue bg:prev_bg) '
untracked = '[… ${count}](fg:brightestorange bg:prev_bg ) '
modified = '[✚ ${count}](fg:mediumorange bg:prev_bg) '
conflicted = '[═ ${count}](fg:yellow bg:prev_bg) '
diverged = '⇕ ${ahead_count}⇣${behind_count}'
[directory]
style = 'bg:light_bg'
format = '[](fg:prev_bg fg:light_bg bg:light_bg)[ $path ]($style)'
truncation_length = 3
truncation_symbol = '…  '
truncate_to_repo = false
read_only = ' 󰌾'
use_os_path_sep = true
# Here is how you can shorten some long paths by text replacement
# similar to mapped_locations in Oh My Posh:
[directory.substitutions]
"Documents" = '󰈙 '
"Downloads" = ''
"Music" = ''
"Pictures" = ''
# Keep in mind that the order matters. For example:
# "Important Documents" = " 󰈙 "
# will not be replaced, because "Documents" was already substituted before.
# So either put "Important Documents" before "Documents" or use the substituted version:
# "Important 󰈙 " = " 󰈙 "
[python]
symbol = ''
style = 'bg:pyth'
format = '[](fg:prev_bg bg:pyth)[ $symbol $version ]($style)'
[status]
style = 'bg:stat'
format = '[](fg:prev_bg bg:stat)[$int]($style)'
disabled = false
[character]
success_symbol = '[](fg:prev_bg)'
error_symbol = '[](fg:stat)'
# == other settings ==
[time]
disabled = false
time_format = '%R' # Hour:Minute Format
style = 'bg:term_bg'
format = '[$time]($style) '
[os]
style = 'bg:#9A348E'
disabled = true # Disabled by default
[battery]
full_symbol = ':battery:'
charging_symbol = ':zap: '
discharging_symbol = ':skull: '
empty_symbol = ':low_battery: '
[c]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[docker_context]
symbol = ''
style = 'bg:#06969A'
format = '[ $symbol $context ]($style)'
[elixir]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[elm]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[golang]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[gradle]
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
symbol = ''
[haskell]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[java]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[julia]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[nodejs]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[nim]
symbol = '󰆥 '
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[rust]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
[scala]
symbol = ''
style = 'bg:#86BBD8'
format = '[ $symbol ($version) ]($style)'
# == symbols ==
[aws]
symbol = ''
[buf]
symbol = ''
[cmake]
symbol = ''
[conda]
symbol = ''
[crystal]
symbol = ''
[dart]
symbol = ''
[fennel]
symbol = ''
[fossil_branch]
symbol = ''
[guix_shell]
symbol = ''
[haxe]
symbol = ''
[hg_branch]
symbol = ''
[hostname]
ssh_symbol = ''
[kotlin]
symbol = ''
[lua]
symbol = ''
[memory_usage]
symbol = '󰍛 '
[meson]
symbol = '󰔷 '
[nix_shell]
symbol = ''
[ocaml]
symbol = ''
[os.symbols]
Alpaquita = ''
Alpine = ''
AlmaLinux = ''
Amazon = ''
Android = ''
Arch = ''
Artix = ''
CachyOS = ''
CentOS = ''
Debian = ''
DragonFly = ''
Emscripten = ''
EndeavourOS = ''
Fedora = ''
FreeBSD = ''
Garuda = '󰛓 '
Gentoo = ''
HardenedBSD = '󰞌 '
Illumos = '󰈸 '
Kali = ''
Linux = ''
Mabox = ''
Macos = ''
Manjaro = ''
Mariner = ''
MidnightBSD = ''
Mint = ''
NetBSD = ''
NixOS = ''
Nobara = ''
OpenBSD = '󰈺 '
openSUSE = ''
OracleLinux = '󰌷 '
Pop = ''
Raspbian = ''
Redhat = ''
RedHatEnterprise = ''
RockyLinux = ''
Redox = '󰀘 '
Solus = '󰠳 '
SUSE = ''
Ubuntu = ''
Unknown = ''
Void = ''
Windows = '󰍲 '
# Disable the package module, hiding it from the prompt completely
[package]
disabled = true
symbol = '󰏗 '
[perl]
symbol = ''
[php]
symbol = ''
[pijul_channel]
symbol = ''
[rlang]
symbol = '󰟔 '
[ruby]
symbol = ''
[swift]
symbol = ''
[zig]
symbol = ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment