Last active
April 3, 2023 12:08
-
-
Save sanmue/e04657a7ca37841c8e97e7fdf0dd6a5c to your computer and use it in GitHub Desktop.
starship.toml; 'Starship shell prompt' config file; Variant 2bg: two line prompt, with background in top line, see screenshot in the comment below for more Info; to remove filling solid line in top row: see comments at the beginning of the toml-file; variant without background in top line: https://gist.github.com/sanmue/f0ed97bed95c7bc7926cc3a88…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get editor completions based on the config schema | |
"$schema" = 'https://starship.rs/config-schema.json' | |
# ~/.config/starship.toml | |
# | |
# ### Variant 2bg: two line prompt, with background in top line, separators on left side | |
# *** Borrowed from a design seen in a zsh (should be from https://github.com/romkatv/powerlevel10k) | |
# | |
# - No filling solid line in top row: | |
# Replace '$fill\' with just one character '\' or just completely delete the line that contains '$fill\' further down, | |
# within the format-block: format = """ ... """. | |
# | |
# - '$line_break': everything from the next line on refers to the second line of the prompt. | |
# | |
# - Some modules listed further down will not show up (all the time), as their default value is 'disabled = true' or | |
# they are only displayed under certain conditions. | |
# | |
# - Symbols: | |
# Don't be confused if you see this toml file via web browser on a website, gist, ... and you don't see any "real" symbols further down. | |
# If Nerd-fonts are already installed on your system (e.g. MesloLG Nerd Font, FiraCode Nerd Font, ...) it should work. | |
# Customizing the prompt (and placing desired modules at desired position and sequence): | |
format = """ | |
[╭╴](fg:#505050)\ | |
$os\ | |
$username\ | |
$hostname\ | |
$sudo\ | |
$directory\ | |
$git_branch$git_commit$git_state$git_metrics$git_status\ | |
$jobs\ | |
$memory_usage\ | |
[ ](fg:#252525)\ | |
$cmd_duration\ | |
$fill\ | |
$line_break\ | |
[╰╴](fg:#505050)\ | |
[$status\ | |
$localip\ | |
$character]($style) | |
""" | |
# Inserts a blank line between shell prompts: | |
add_newline = true | |
# Customization and activation of some modules: | |
# Listed in the order of their position in the module row above | |
[os] | |
format = "[](fg:#252525)[$symbol ]($style)[ ](bg:#252525)" | |
style = "fg:#AAAAAA bg:#252525" | |
disabled = false | |
[os.symbols] | |
Alpine = "" | |
Amazon = "" | |
Android = "" | |
Arch = "" | |
CentOS = "" | |
Debian = "" | |
DragonFly = "🐉" # "" | |
Emscripten = "🔗" | |
EndeavourOS = "" # "" | |
Fedora = "" | |
FreeBSD = "" | |
Garuda = "" | |
Gentoo = "" | |
HardenedBSD = "聯" | |
Illumos = "🐦" | |
Linux = "" | |
Macos = "" | |
Manjaro = "" | |
Mariner = "" | |
MidnightBSD = "🌘" | |
Mint = "" | |
NetBSD = "" | |
NixOS = "" | |
OpenBSD = "" # "" | |
OpenCloudOS = "☁️" | |
openEuler = "" | |
openSUSE = "" | |
OracleLinux = "⊂⊃" | |
Pop = "" # "" | |
Raspbian = "" | |
Redhat = "" | |
RedHatEnterprise = "" | |
Redox = "🧪" | |
Solus = "" # " " | |
SUSE = "" | |
Ubuntu = "" | |
Unknown = "" | |
Windows = "" | |
[username] | |
format = '[ ](fg:green bold bg:#252525)[$user]($style)[ ](bg:#252525)' | |
style_user = 'fg:green bold bg:#252525' | |
style_root = 'fg:red bold bg:#252525' | |
show_always = false | |
disabled = false | |
[hostname] | |
format = '[$ssh_symbol ](fg:green bold bg:#252525)[$hostname](fg:green bold bg:#252525)[ ](bg:#252525)' | |
ssh_only = true | |
ssh_symbol = '' # '⇒' # ' ' # 'fi⇒' | |
#trim_at = '.companyname.com' | |
disabled = false | |
[sudo] | |
format = '[ ](fg:red bold bg:#252525)[as $symbol]($style)' | |
style = 'fg:red bold bg:#252525' | |
symbol = ' ' # ' ❯ ' | |
disabled = false | |
[directory] | |
format = '[ ](fg:cyan bold bg:#252525)[$read_only]($read_only_style)[$repo_root]($repo_root_style)[$path]($style)' | |
style = 'fg:cyan bold bg:#252525' | |
home_symbol = ' ~' | |
read_only = ' ' # ' ' # ' '' | |
read_only_style = 'fg:cyan bg:#252525' | |
truncation_length = 3 | |
truncation_symbol = '…/' | |
truncate_to_repo = true | |
repo_root_format = '[ ](fg:cyan bold bg:#252525)[$read_only]($read_only_style)[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[ ](bg:#252525)' | |
repo_root_style = 'fg:cyan bold bg:#252525' | |
use_os_path_sep = true | |
disabled = false | |
[git_branch] | |
format = '[❯ $symbol $branch(:$remote_branch)]($style)[ ](bg:#252525)' | |
style = 'fg:#E04D27 bg:#252525' | |
symbol = '' | |
#ignore_branches = ['master', 'main'] | |
[git_commit] | |
format = '[\($hash$tag\)]($style)[ ](bg:#252525)' | |
style = 'fg:#E04D27 bg:#252525' | |
commit_hash_length = 8 | |
tag_symbol = ' ' # ' '' | |
disabled = false | |
[git_metrics] | |
format = '[\[+$added/]($added_style)[-$deleted\]]($deleted_style)[ ](bg:#252525)' | |
added_style = 'fg:#E04D27 bg:#252525' | |
deleted_style = 'fg:#E04D27 bg:#252525' | |
disabled = false | |
[git_status] | |
# place symbols before '$count' | |
format = '([$all_status$ahead_behind]($style))' | |
style = 'fg:#E04D27' | |
conflicted = '[${count} ](fg:red)' | |
ahead = '[⇡${count} ](fg:yellow)' | |
behind = '[⇣${count} ](fg:yellow)' | |
diverged = '[⇕${ahead_count}⇡${behind_count}⇣ ](fg:yellow)' # ⇕ ↕ ⇳ | |
up_to_date = '[✓ ](fg:green)' | |
untracked = '[ﳇ${count} ](fg:red)' # ' ' # '? ' | |
stashed = '[${count} ](fg:#A52A2A)' # '📦 '# ' ' # ' ' # ' ' # ' ' | |
modified = '[${count} ](fg:#C8AC00)' # '📝' # '! ' # # # | |
staged = '[${count} ](fg:green)' # '+ ' | |
renamed = '[${count} ](fg:yellow)' # ' ' # '' # ᴂ # # # # ﳳ | |
deleted = '[${count} ](fg:orange)' # '🗑 ' '- ' | |
disabled = false | |
[jobs] | |
format = '[ ](fg:blue bold bg:#252525)[$number$symbol]($style)' | |
style = 'fg:blue bg:#252525' | |
symbol = '省' # '廒' # '' # '' # '✦' | |
symbol_threshold = 1 | |
number_threshold = 4 | |
disabled = false | |
[memory_usage] | |
format = '[ ](fg:purple bold bg:#252525)[$symbol ${ram} ${swap}]($style)' | |
style = 'fg:purple bg:#252525' | |
symbol = ' 北' # ' 痢' # ' / ' # ' ' # ' ' # ' ' # ' ' ' ' | |
threshold = 75 | |
disabled = false | |
[cmd_duration] | |
format = '[ $duration ]($style)' | |
style = 'fg:yellow' | |
min_time = 500 | |
disabled = false | |
[fill] | |
style = 'fg:#505050' | |
symbol = '─' | |
[status] | |
format = '[$symbol$status $hex_status $signal_number-$signal_name ]($style)' | |
style = 'fg:red' | |
symbol = '✘ ' | |
disabled = false | |
[localip] | |
format = '[$localipv4 ](fg:green bold)' | |
ssh_only = true | |
disabled = false |
Author
sanmue
commented
Mar 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment