2021-07-02 13:54:21 +00:00
|
|
|
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'
|
2024-11-14 13:17:25 +00:00
|
|
|
|
2021-07-02 13:54:21 +00:00
|
|
|
[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) '
|
2024-11-14 13:17:25 +00:00
|
|
|
|
|
|
|
[custom.ranger]
|
|
|
|
command = '''echo $RANGER_LEVEL'''
|
|
|
|
when = 'if [ -v ${RANGER_LEVEL} ]; then false; else true; fi'
|
|
|
|
shell = [
|
|
|
|
'sh',
|
|
|
|
'--norc',
|
|
|
|
'--noprofile',
|
|
|
|
]
|
|
|
|
style = 'bright-blue bold'
|
|
|
|
format = '[\(ranger: $output\)]($style) '
|