refactor: use palette definition to avoid repeated hardcoded hex colours #1

Merged
marc merged 1 commit from refactor/starship-palette into main 2024-11-01 21:19:45 +00:00

View file

@ -1,53 +1,59 @@
# Marc's env managed block - BEGIN
format = """ format = """
[](bold green) \ [](bold green) \
[](#9A348E)\ [](color_orange)\
$username$hostname\ $username$hostname\
$os\ $os\
[](bg:#33658a fg:#9A348E)\ [](bg:color_blue fg:color_orange)\
$time\ $time\
[](bg:#DA627D fg:#33658a)\ [](bg:color_green fg:color_blue)\
$directory\ $directory\
[](fg:#DA627D bg:#3208e0)\ [](fg:color_green bg:color_pink)\
$git_branch\ $git_branch\
$git_status\ $git_status\
[](fg:#4208e0 bg:#9A348E)\ [](fg:color_pink bg:color_red)\
$python\ $python\
[](fg:#9A348E) [](fg:color_red)
[ ](bold green) [ ](bold green)
""" """
# Disable the blank line at the start of the prompt # Disable the blank line at the start of the prompt
add_newline = false add_newline = false
[python] palette = 'default'
style = "bg:#9A348E"
format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
[palettes.default]
color_blue = '#458588'
color_green = '#98971a'
color_orange = '#d65d0e'
color_pink = '#b16286'
color_red = '#cc241d'
[python]
style = "bg:color_red"
format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
# You can also replace your username with a neat symbol like  or disable this # You can also replace your username with a neat symbol like  or disable this
# and use the os module below # and use the os module below
[username] [username]
show_always = true show_always = true
style_user = "bg:#9A348E" style_user = "bg:color_orange"
style_root = "bg:#9A348E" style_root = "bg:color_orange"
format = '[$user]($style)' format = '[$user]($style)'
disabled = false disabled = false
[hostname] [hostname]
format = '[@$hostname ]($style)' format = '[@$hostname ]($style)'
style = "bg:#9A348E" style = "bg:color_orange"
ssh_only = false ssh_only = false
# An alternative to the username module which displays a symbol that # An alternative to the username module which displays a symbol that
# represents the current operating system # represents the current operating system
[os] [os]
style = "bg:#9A348E" style = "bg:color_red"
disabled = true # Disabled by default disabled = true # Disabled by default
[directory] [directory]
style = "bg:#DA627D" style = "bg:color_green"
format = "[ $path ]($style)" format = "[ $path ]($style)"
truncation_length = 3 truncation_length = 3
truncation_symbol = "…/" truncation_symbol = "…/"
@ -67,16 +73,15 @@ truncation_symbol = "…/"
[git_branch] [git_branch]
symbol = "" symbol = ""
style = "bg:#4208e0" style = "bg:color_pink"
format = '[ $symbol $branch ]($style)' format = '[ $symbol $branch ]($style)'
[git_status] [git_status]
style = "bg:#4208e0" style = "bg:color_pink"
format = '[$all_status$ahead_behind ]($style)' format = '[$all_status$ahead_behind ]($style)'
[time] [time]
time_format = "%T" time_format = "%T"
style = "bg:#33658A" style = "bg:color_blue"
format = '[ $time ]($style)' format = '[ $time ]($style)'
disabled = false disabled = false
# Marc's env managed block - END