dots/starship/.config/starship.toml

56 lines
1.1 KiB
TOML

add_newline = false
[directory]
truncation_length = 5
format = '[$path]($style)[$lock_symbol]($lock_style) '
[git_commit]
commit_hash_length = 8
style = 'bold white'
[git_state]
[hostname]
ssh_only = true
format = '<[$hostname]($style)>'
trim_at = '-'
style = 'bold dimmed white'
[memory_usage]
format = '[${ram}(| ${swap})]($style) '
threshold = 50
style = 'bold dimmed white'
disabled = true
[username]
style_user = 'bold dimmed blue'
[custom.git_host]
command = '''
IFS="/"
GIT_REMOTE=$(command git ls-remote --get-url 2> /dev/null)
read -ra GIT_HOST <<< "$GIT_REMOTE"
if [[ "$GIT_REMOTE" =~ "github" ]]; then
GIT_REMOTE_SYMBOL=" "
elif [[ "$GIT_REMOTE" =~ "gitlab" ]]; then
GIT_REMOTE_SYMBOL=" "
elif [[ "$GIT_REMOTE" =~ "bitbucket" ]]; then
GIT_REMOTE_SYMBOL=" "
elif [[ "$GIT_REMOTE" =~ "git" ]]; then
GIT_REMOTE_SYMBOL=" "
else
GIT_REMOTE_SYMBOL=" localhost"
fi
echo "$GIT_REMOTE_SYMBOL${GIT_HOST[2]}"
IFS=" "
'''
when = 'git rev-parse --is-inside-work-tree 2> /dev/null'
shell = [
'sh',
'--norc',
'--noprofile',
]
style = 'bright-yellow bold'
format = 'at [$output]($style) '