-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstarship.toml
146 lines (122 loc) · 4.58 KB
/
starship.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# DOCS https://starship.rs/config/
format = """[\
${custom.location_indicator}$directory${custom.folder_number}\
${custom.main_branch}$git_branch\
${custom.venv_on}${custom.venv_off}\
$git_status$git_metrics$git_commit$git_state\
$sudo $status\
](bg:black)\
$character\
"""
right_format = """\
$jobs\
$cmd_duration\
${custom.alfred}$python\
"""
add_newline = false
#───────────────────────────────────────────────────────────────────────────────
# LEFT SIDE
[character] # ▓▒░ nerdfont ids start with `nf-ple-`
success_symbol = "[ ](fg:black)"
error_symbol = "[ ](fg:red)"
vimcmd_symbol = "[ ](fg:cyan)"
[status] # exit code
disabled = false
format = "[ $status ]($style)"
style = "fg:bold 255 bg:red" # 255 as ansi enforces white regardless of terminal theme
[sudo]
disabled = false
style = 'fg:#f1800e bg:black'
symbol = " "
format = "[ $symbol]($style)"
[directory]
truncation_length = 2
truncation_symbol = "/"
read_only = " "
read_only_style = "fg:red bg:black"
style = "fg:cyan bg:black bold"
format = "[$path]($style) [$read_only]($read_only_style)"
[directory.substitutions]
# General
"Library/Mobile Documents/com~apple~CloudDocs" = " "
"~/Desktop" = "/ "
"~" = "/ "
# my perma-repos
".config" = " "
"main-vault" = " "
"phd-data-analysis" = " "
"writing-vault" = " "
".password-store" = " "
[custom.folder_number]
when = "true"
description = "Number of files (and folders) in the current working directory"
command = "find . -mindepth 1 -maxdepth 1 -not -name '.git' -not -name '.DS_Store' -not -name '.localized' -not -name 'Icon?' | wc -l"
format = '[ $output ]($style)'
style = "fg:yellow bg:black"
# Indicate if in a subfolder of my local repo folder. Helps differentiating
# between my local Alfred workflows and their respective repos.
[custom.location_indicator]
format = '[ ]($style)'
when = '[[ $PWD == $HOME/Developer/* ]]'
style = "fg:cyan bold bg:black"
[custom.venv_on]
format = '[ ]($style)'
when = '[[ -n "$VIRTUAL_ENV" ]]'
style = "fg:yellow bold bg:black"
[custom.venv_off]
format = '[ ]($style)'
when = '[[ -z "$VIRTUAL_ENV" ]] && [[ -d ".venv" ]]'
style = "fg:red bold bg:black"
#───────────────────────────────────────────────────────────────────────────────
# GIT
[git_state] # conflicts or rebasing
style = 'fg:yellow bold bg:black'
format = ' \([$state( $progress_current/$progress_total)]($style)\)'
[git_commit] # checkout
style = "fg:purple bg:black bold"
only_detached = true
format = " [ $hash]($style)"
[git_branch] # branch
only_attached = true
style = "fg:purple bg:black bold"
format = " [ $branch]($style)"
ignore_branches = ["main"]
# since "ignore_branches" fully hides the git_branch component, still showing the symbol
[custom.main_branch]
when = "[[ $(git branch --show-current) == 'main' ]]"
format = ' [ ](fg:purple bg:black bold)'
[git_status] # files
stashed = '[ $count](fg:cyan bg:black)'
untracked = '[ +$count](fg:green bg:black)'
# `deleted` -> unstaged as well as staged deletion
deleted = '[ -$count](fg:red bg:black)'
modified = '[ ~$count](fg:#fa881e bg:black)'
renamed = '[ $count](fg:blue bg:black)'
staged = '[ $count](fg:green bg:black)'
conflicted = '[ $count](fg:red bg:black)'
diverged = '[ $count](fg:red bg:black)'
ahead = '[ $count](fg:cyan bg:black)'
behind = '[ $count](fg:yellow bg:black)'
style = 'bg:black'
format = '[($ahead_behind$conflicted$stashed$staged$untracked$renamed$modified$deleted )]($style)'
# INFO putting a variable into round bracket ensures that the bracket content is
# only shown when the variable is set. `bright-black` is effectively gray.
[git_metrics] # changed lines
disabled = false
format = """\
([\\(](fg:bright-black bg:black)\
[(+$added)](fg:green bg:black)\
[/](fg:bright-black bg:black)\
[(-$deleted)](fg:red bg:black)\
[\\)](fg:bright-black bg:black))\
"""
#───────────────────────────────────────────────────────────────────────────────
# RIGHT SIDE
[cmd_duration]
min_time = 3000
format = "[ $duration](bold cyan)"
[python]
format = ' [${symbol}${pyenv_prefix}($version)]($style)'
version_format = "$major.$minor"
symbol = " "
style = "bold yellow"