Last active
January 8, 2024 09:49
-
-
Save sanmue/f0ed97bed95c7bc7926cc3a88949bd39 to your computer and use it in GitHub Desktop.
starship.toml; 'Starship shell prompt' config file; Variant 2: two line prompt, no 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 with background in top line: https://gist.github.com/sanmue/e04657a7ca37841c8e97e7fdf0dd6a5c
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 2: two line prompt, no 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:#242424)\ | |
$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 = "[$symbol ]($style)[ ]()" | |
style = "fg:#AAAAAA" | |
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)[$user]($style)[ ]()' | |
style_user = 'fg:green bold' | |
style_root = 'fg:red bold' | |
show_always = false | |
disabled = false | |
[hostname] | |
format = '[$ssh_symbol ](fg:green bold)[$hostname](fg:green bold)[ ]()' | |
ssh_only = true | |
ssh_symbol = '' # '⇒' # ' ' # 'fi⇒' | |
#trim_at = '.companyname.com' | |
disabled = false | |
[sudo] | |
format = '[ ](fg:red bold)[as $symbol]($style)' | |
style = 'fg:red bold' | |
symbol = ' ' # ' ❯ ' | |
disabled = false | |
[directory] | |
format = '[ ](fg:cyan bold)[$read_only]($read_only_style)[$repo_root]($repo_root_style)[$path]($style)' | |
style = 'fg:cyan bold' | |
home_symbol = ' ~' | |
read_only = ' ' # ' ' # ' '' | |
read_only_style = 'fg:cyan' | |
truncation_length = 3 | |
truncation_symbol = '…/' | |
truncate_to_repo = true | |
repo_root_format = '[ ](fg:cyan bold)[$read_only]($read_only_style)[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[ ]()' | |
repo_root_style = 'fg:cyan bold' | |
use_os_path_sep = true | |
disabled = false | |
[git_branch] | |
format = '[❯ $symbol $branch(:$remote_branch)]($style)[ ]()' | |
style = 'fg:#E04D27' | |
symbol = '' | |
#ignore_branches = ['master', 'main'] | |
[git_commit] | |
format = '[\($hash$tag\)]($style)[ ]()' | |
style = 'fg:#E04D27' | |
commit_hash_length = 8 | |
tag_symbol = ' ' # ' '' | |
disabled = false | |
[git_metrics] | |
format = '[\[+$added/]($added_style)[-$deleted\]]($deleted_style)[ ]()' | |
added_style = 'fg:#E04D27' | |
deleted_style = 'fg:#E04D27' | |
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)[$number$symbol]($style)' | |
style = 'fg:blue' | |
symbol = '省' # '廒' # '' # '' # '✦' | |
symbol_threshold = 1 | |
number_threshold = 4 | |
disabled = false | |
[memory_usage] | |
format = '[ ](fg:purple bold)[$symbol ${ram} ${swap}]($style)' | |
style = 'fg:purple' | |
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