diff options
Diffstat (limited to 'user-profiles/zsh/p10k.zsh')
-rw-r--r-- | user-profiles/zsh/p10k.zsh | 1572 |
1 files changed, 1572 insertions, 0 deletions
diff --git a/user-profiles/zsh/p10k.zsh b/user-profiles/zsh/p10k.zsh new file mode 100644 index 00000000..fb9af12c --- /dev/null +++ b/user-profiles/zsh/p10k.zsh | |||
@@ -0,0 +1,1572 @@ | |||
1 | # Generated by Powerlevel10k configuration wizard on 2021-01-03 at 15:43 CET. | ||
2 | # Based on romkatv/powerlevel10k/config/p10k-lean.zsh. | ||
3 | # Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 24h time, | ||
4 | # 2 lines, solid, no frame, darkest-ornaments, sparse, many icons, concise, | ||
5 | # transient_prompt, instant_prompt=quiet. | ||
6 | # Type `p10k configure` to generate another config. | ||
7 | # | ||
8 | # Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate | ||
9 | # your own config based on it. | ||
10 | # | ||
11 | # Tip: Looking for a nice color? Here's a one-liner to print colormap. | ||
12 | # | ||
13 | # for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done | ||
14 | |||
15 | # Temporarily change options. | ||
16 | 'builtin' 'local' '-a' 'p10k_config_opts' | ||
17 | [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') | ||
18 | [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') | ||
19 | [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') | ||
20 | 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' | ||
21 | |||
22 | () { | ||
23 | emulate -L zsh -o extended_glob | ||
24 | |||
25 | # Unset all configuration options. This allows you to apply configuration changes without | ||
26 | # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. | ||
27 | unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' | ||
28 | |||
29 | # Zsh >= 5.1 is required. | ||
30 | autoload -Uz is-at-least && is-at-least 5.1 || return | ||
31 | |||
32 | # The list of segments shown on the left. Fill it with the most important segments. | ||
33 | typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( | ||
34 | # =========================[ Line #1 ]========================= | ||
35 | # os_icon # os identifier | ||
36 | dir # current directory | ||
37 | vcs # git status | ||
38 | # =========================[ Line #2 ]========================= | ||
39 | newline # \n | ||
40 | prompt_char # prompt symbol | ||
41 | ) | ||
42 | |||
43 | # The list of segments shown on the right. Fill it with less important segments. | ||
44 | # Right prompt on the last prompt line (where you are typing your commands) gets | ||
45 | # automatically hidden when the input line reaches it. Right prompt above the | ||
46 | # last prompt line gets hidden if it would overlap with left prompt. | ||
47 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( | ||
48 | # =========================[ Line #1 ]========================= | ||
49 | status # exit code of the last command | ||
50 | command_execution_time # duration of the last command | ||
51 | background_jobs # presence of background jobs | ||
52 | direnv # direnv status (https://direnv.net/) | ||
53 | asdf # asdf version manager (https://github.com/asdf-vm/asdf) | ||
54 | virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) | ||
55 | anaconda # conda environment (https://conda.io/) | ||
56 | pyenv # python environment (https://github.com/pyenv/pyenv) | ||
57 | goenv # go environment (https://github.com/syndbg/goenv) | ||
58 | nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) | ||
59 | nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) | ||
60 | nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) | ||
61 | # node_version # node.js version | ||
62 | # go_version # go version (https://golang.org) | ||
63 | # rust_version # rustc version (https://www.rust-lang.org) | ||
64 | # dotnet_version # .NET version (https://dotnet.microsoft.com) | ||
65 | # php_version # php version (https://www.php.net/) | ||
66 | # laravel_version # laravel php framework version (https://laravel.com/) | ||
67 | # java_version # java version (https://www.java.com/) | ||
68 | # package # name@version from package.json (https://docs.npmjs.com/files/package.json) | ||
69 | rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) | ||
70 | rvm # ruby version from rvm (https://rvm.io) | ||
71 | fvm # flutter version management (https://github.com/leoafarias/fvm) | ||
72 | luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) | ||
73 | jenv # java version from jenv (https://github.com/jenv/jenv) | ||
74 | plenv # perl version from plenv (https://github.com/tokuhirom/plenv) | ||
75 | phpenv # php version from phpenv (https://github.com/phpenv/phpenv) | ||
76 | scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) | ||
77 | haskell_stack # haskell version from stack (https://haskellstack.org/) | ||
78 | kubecontext # current kubernetes context (https://kubernetes.io/) | ||
79 | terraform # terraform workspace (https://www.terraform.io) | ||
80 | aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) | ||
81 | aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) | ||
82 | azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) | ||
83 | gcloud # google cloud cli account and project (https://cloud.google.com/) | ||
84 | google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) | ||
85 | context # user@hostname | ||
86 | nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) | ||
87 | ranger # ranger shell (https://github.com/ranger/ranger) | ||
88 | nnn # nnn shell (https://github.com/jarun/nnn) | ||
89 | vim_shell # vim shell indicator (:sh) | ||
90 | midnight_commander # midnight commander shell (https://midnight-commander.org/) | ||
91 | nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) | ||
92 | # vpn_ip # virtual private network indicator | ||
93 | # load # CPU load | ||
94 | # disk_usage # disk usage | ||
95 | # ram # free RAM | ||
96 | # swap # used swap | ||
97 | todo # todo items (https://github.com/todotxt/todo.txt-cli) | ||
98 | timewarrior # timewarrior tracking status (https://timewarrior.net/) | ||
99 | taskwarrior # taskwarrior task count (https://taskwarrior.org/) | ||
100 | time # current time | ||
101 | # =========================[ Line #2 ]========================= | ||
102 | newline | ||
103 | # ip # ip address and bandwidth usage for a specified network interface | ||
104 | # public_ip # public IP address | ||
105 | # proxy # system-wide http/https/ftp proxy | ||
106 | # battery # internal battery | ||
107 | # wifi # wifi speed | ||
108 | # example # example user-defined segment (see prompt_example function below) | ||
109 | ) | ||
110 | |||
111 | # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. | ||
112 | typeset -g POWERLEVEL9K_MODE=nerdfont-complete | ||
113 | # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid | ||
114 | # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. | ||
115 | typeset -g POWERLEVEL9K_ICON_PADDING=none | ||
116 | |||
117 | # Basic style options that define the overall look of your prompt. You probably don't want to | ||
118 | # change them. | ||
119 | typeset -g POWERLEVEL9K_BACKGROUND= # transparent background | ||
120 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace | ||
121 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space | ||
122 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol | ||
123 | |||
124 | # When set to true, icons appear before content on both sides of the prompt. When set | ||
125 | # to false, icons go after content. If empty or not set, icons go before content in the left | ||
126 | # prompt and after content in the right prompt. | ||
127 | # | ||
128 | # You can also override it for a specific segment: | ||
129 | # | ||
130 | # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false | ||
131 | # | ||
132 | # Or for a specific segment in specific state: | ||
133 | # | ||
134 | # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false | ||
135 | typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true | ||
136 | |||
137 | # Add an empty line before each prompt. | ||
138 | typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true | ||
139 | |||
140 | # Connect left prompt lines with these symbols. | ||
141 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= | ||
142 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= | ||
143 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= | ||
144 | # Connect right prompt lines with these symbols. | ||
145 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= | ||
146 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= | ||
147 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= | ||
148 | |||
149 | # The left end of left prompt. | ||
150 | typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= | ||
151 | # The right end of right prompt. | ||
152 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= | ||
153 | |||
154 | # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll | ||
155 | # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and | ||
156 | # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. | ||
157 | typeset -g POWERLEVEL9K_SHOW_RULER=false | ||
158 | typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' | ||
159 | typeset -g POWERLEVEL9K_RULER_FOREGROUND=238 | ||
160 | |||
161 | # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' | ||
162 | # to make it easier to see the alignment between left and right prompt and to separate prompt | ||
163 | # from command output. It serves the same purpose as ruler (see above) without increasing | ||
164 | # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false | ||
165 | # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact | ||
166 | # prompt. | ||
167 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='─' | ||
168 | if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then | ||
169 | # The color of the filler. | ||
170 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=238 | ||
171 | # Add a space between the end of left prompt and the filler. | ||
172 | typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' | ||
173 | # Add a space between the filler and the start of right prompt. | ||
174 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' | ||
175 | # Start filler from the edge of the screen if there are no left segments on the first line. | ||
176 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' | ||
177 | # End filler on the edge of the screen if there are no right segments on the first line. | ||
178 | typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' | ||
179 | fi | ||
180 | |||
181 | #################################[ os_icon: os identifier ]################################## | ||
182 | # OS identifier color. | ||
183 | typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= | ||
184 | # Custom icon. | ||
185 | # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' | ||
186 | |||
187 | ################################[ prompt_char: prompt symbol ]################################ | ||
188 | # Green prompt symbol if the last command succeeded. | ||
189 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 | ||
190 | # Red prompt symbol if the last command failed. | ||
191 | typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 | ||
192 | # Default prompt symbol. | ||
193 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' | ||
194 | # Prompt symbol in command vi mode. | ||
195 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' | ||
196 | # Prompt symbol in visual vi mode. | ||
197 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' | ||
198 | # Prompt symbol in overwrite vi mode. | ||
199 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' | ||
200 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true | ||
201 | # No line terminator if prompt_char is the last segment. | ||
202 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' | ||
203 | # No line introducer if prompt_char is the first segment. | ||
204 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= | ||
205 | |||
206 | ##################################[ dir: current directory ]################################## | ||
207 | # Default current directory color. | ||
208 | typeset -g POWERLEVEL9K_DIR_FOREGROUND=31 | ||
209 | # If directory is too long, shorten some of its segments to the shortest possible unique | ||
210 | # prefix. The shortened directory can be tab-completed to the original. | ||
211 | typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique | ||
212 | # Replace removed segment suffixes with this symbol. | ||
213 | typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= | ||
214 | # Color of the shortened directory segments. | ||
215 | typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 | ||
216 | # Color of the anchor directory segments. Anchor segments are never shortened. The first | ||
217 | # segment is always an anchor. | ||
218 | typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 | ||
219 | # Display anchor directory segments in bold. | ||
220 | typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true | ||
221 | # Don't shorten directories that contain any of these files. They are anchors. | ||
222 | local anchor_files=( | ||
223 | .bzr | ||
224 | .citc | ||
225 | .git | ||
226 | .hg | ||
227 | .node-version | ||
228 | .python-version | ||
229 | .go-version | ||
230 | .ruby-version | ||
231 | .lua-version | ||
232 | .java-version | ||
233 | .perl-version | ||
234 | .php-version | ||
235 | .tool-version | ||
236 | .shorten_folder_marker | ||
237 | .svn | ||
238 | .terraform | ||
239 | CVS | ||
240 | Cargo.toml | ||
241 | composer.json | ||
242 | go.mod | ||
243 | package.json | ||
244 | stack.yaml | ||
245 | ) | ||
246 | typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" | ||
247 | # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains | ||
248 | # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is | ||
249 | # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) | ||
250 | # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers | ||
251 | # and other directories don't. | ||
252 | # | ||
253 | # Optionally, "first" and "last" can be followed by ":<offset>" where <offset> is an integer. | ||
254 | # This moves the truncation point to the right (positive offset) or to the left (negative offset) | ||
255 | # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" | ||
256 | # respectively. | ||
257 | typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false | ||
258 | # Don't shorten this many last directory segments. They are anchors. | ||
259 | typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 | ||
260 | # Shorten directory if it's longer than this even if there is space for it. The value can | ||
261 | # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, | ||
262 | # directory will be shortened only when prompt doesn't fit or when other parameters demand it | ||
263 | # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). | ||
264 | # If set to `0`, directory will always be shortened to its minimum length. | ||
265 | typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 | ||
266 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this | ||
267 | # many columns for typing commands. | ||
268 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 | ||
269 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least | ||
270 | # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. | ||
271 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 | ||
272 | # If set to true, embed a hyperlink into the directory. Useful for quickly | ||
273 | # opening a directory in the file manager simply by clicking the link. | ||
274 | # Can also be handy when the directory is shortened, as it allows you to see | ||
275 | # the full directory that was used in previous commands. | ||
276 | typeset -g POWERLEVEL9K_DIR_HYPERLINK=false | ||
277 | |||
278 | # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON | ||
279 | # and POWERLEVEL9K_DIR_CLASSES below. | ||
280 | typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 | ||
281 | |||
282 | # The default icon shown next to non-writable and non-existent directories when | ||
283 | # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. | ||
284 | # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' | ||
285 | |||
286 | # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different | ||
287 | # directories. It must be an array with 3 * N elements. Each triplet consists of: | ||
288 | # | ||
289 | # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with | ||
290 | # extended_glob option enabled. | ||
291 | # 2. Directory class for the purpose of styling. | ||
292 | # 3. An empty string. | ||
293 | # | ||
294 | # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. | ||
295 | # | ||
296 | # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories | ||
297 | # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. | ||
298 | # | ||
299 | # For example, given these settings: | ||
300 | # | ||
301 | # typeset -g POWERLEVEL9K_DIR_CLASSES=( | ||
302 | # '~/work(|/*)' WORK '' | ||
303 | # '~(|/*)' HOME '' | ||
304 | # '*' DEFAULT '') | ||
305 | # | ||
306 | # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one | ||
307 | # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or | ||
308 | # WORK_NON_EXISTENT. | ||
309 | # | ||
310 | # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an | ||
311 | # option to define custom colors and icons for different directory classes. | ||
312 | # | ||
313 | # # Styling for WORK. | ||
314 | # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
315 | # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 | ||
316 | # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 | ||
317 | # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 | ||
318 | # | ||
319 | # # Styling for WORK_NOT_WRITABLE. | ||
320 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
321 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 | ||
322 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 | ||
323 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 | ||
324 | # | ||
325 | # # Styling for WORK_NON_EXISTENT. | ||
326 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
327 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 | ||
328 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 | ||
329 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 | ||
330 | # | ||
331 | # If a styling parameter isn't explicitly defined for some class, it falls back to the classless | ||
332 | # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls | ||
333 | # back to POWERLEVEL9K_DIR_FOREGROUND. | ||
334 | # | ||
335 | # typeset -g POWERLEVEL9K_DIR_CLASSES=() | ||
336 | |||
337 | # Custom prefix. | ||
338 | # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' | ||
339 | |||
340 | #####################################[ vcs: git status ]###################################### | ||
341 | # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. | ||
342 | typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' | ||
343 | |||
344 | # Untracked files icon. It's really a question mark, your font isn't broken. | ||
345 | # Change the value of this parameter to show a different icon. | ||
346 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' | ||
347 | |||
348 | # Formatter for Git status. | ||
349 | # | ||
350 | # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. | ||
351 | # | ||
352 | # You can edit the function to customize how Git status looks. | ||
353 | # | ||
354 | # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: | ||
355 | # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. | ||
356 | function my_git_formatter() { | ||
357 | emulate -L zsh | ||
358 | |||
359 | if [[ -n $P9K_CONTENT ]]; then | ||
360 | # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from | ||
361 | # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. | ||
362 | typeset -g my_git_format=$P9K_CONTENT | ||
363 | return | ||
364 | fi | ||
365 | |||
366 | if (( $1 )); then | ||
367 | # Styling for up-to-date Git status. | ||
368 | local meta='%f' # default foreground | ||
369 | local clean='%76F' # green foreground | ||
370 | local modified='%178F' # yellow foreground | ||
371 | local untracked='%39F' # blue foreground | ||
372 | local conflicted='%196F' # red foreground | ||
373 | else | ||
374 | # Styling for incomplete and stale Git status. | ||
375 | local meta='%244F' # grey foreground | ||
376 | local clean='%244F' # grey foreground | ||
377 | local modified='%244F' # grey foreground | ||
378 | local untracked='%244F' # grey foreground | ||
379 | local conflicted='%244F' # grey foreground | ||
380 | fi | ||
381 | |||
382 | local res | ||
383 | local where # branch or tag | ||
384 | if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then | ||
385 | res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}" | ||
386 | where=${(V)VCS_STATUS_LOCAL_BRANCH} | ||
387 | elif [[ -n $VCS_STATUS_TAG ]]; then | ||
388 | res+="${meta}#" | ||
389 | where=${(V)VCS_STATUS_TAG} | ||
390 | fi | ||
391 | |||
392 | # If local branch name or tag is at most 32 characters long, show it in full. | ||
393 | # Otherwise show the first 12 … the last 12. | ||
394 | # Tip: To always show local branch name in full without truncation, delete the next line. | ||
395 | (( $#where > 32 )) && where[13,-13]="…" | ||
396 | |||
397 | res+="${clean}${where//\%/%%}" # escape % | ||
398 | |||
399 | # Display the current Git commit if there is no branch or tag. | ||
400 | # Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line. | ||
401 | [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" | ||
402 | |||
403 | # Show tracking branch name if it differs from local branch. | ||
404 | if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then | ||
405 | res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % | ||
406 | fi | ||
407 | |||
408 | # ⇣42 if behind the remote. | ||
409 | (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" | ||
410 | # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. | ||
411 | (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " | ||
412 | (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" | ||
413 | # ⇠42 if behind the push remote. | ||
414 | (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" | ||
415 | (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " | ||
416 | # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. | ||
417 | (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" | ||
418 | # *42 if have stashes. | ||
419 | (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" | ||
420 | # 'merge' if the repo is in an unusual state. | ||
421 | [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" | ||
422 | # ~42 if have merge conflicts. | ||
423 | (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" | ||
424 | # +42 if have staged changes. | ||
425 | (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" | ||
426 | # !42 if have unstaged changes. | ||
427 | (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" | ||
428 | # ?42 if have untracked files. It's really a question mark, your font isn't broken. | ||
429 | # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. | ||
430 | # Remove the next line if you don't want to see untracked files at all. | ||
431 | (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" | ||
432 | # "─" if the number of unstaged files is unknown. This can happen due to | ||
433 | # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower | ||
434 | # than the number of files in the Git index, or due to bash.showDirtyState being set to false | ||
435 | # in the repository config. The number of staged and untracked files may also be unknown | ||
436 | # in this case. | ||
437 | (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" | ||
438 | |||
439 | typeset -g my_git_format=$res | ||
440 | } | ||
441 | functions -M my_git_formatter 2>/dev/null | ||
442 | |||
443 | # Don't count the number of unstaged, untracked and conflicted files in Git repositories with | ||
444 | # more than this many files in the index. Negative value means infinity. | ||
445 | # | ||
446 | # If you are working in Git repositories with tens of millions of files and seeing performance | ||
447 | # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output | ||
448 | # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's | ||
449 | # config: `git config bash.showDirtyState false`. | ||
450 | typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 | ||
451 | |||
452 | # Don't show Git status in prompt for repositories whose workdir matches this pattern. | ||
453 | # For example, if set to '~', the Git repository at $HOME/.git will be ignored. | ||
454 | # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. | ||
455 | typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' | ||
456 | |||
457 | # Disable the default Git status formatting. | ||
458 | typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true | ||
459 | # Install our own Git status formatter. | ||
460 | typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' | ||
461 | typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' | ||
462 | # Enable counters for staged, unstaged, etc. | ||
463 | typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 | ||
464 | |||
465 | # Icon color. | ||
466 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 | ||
467 | typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 | ||
468 | # Custom icon. | ||
469 | # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
470 | # Custom prefix. | ||
471 | # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' | ||
472 | |||
473 | # Show status of repositories of these types. You can add svn and/or hg if you are | ||
474 | # using them. If you do, your prompt may become slow even when your current directory | ||
475 | # isn't in an svn or hg reposotiry. | ||
476 | typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) | ||
477 | |||
478 | # These settings are used for repositories other than Git or when gitstatusd fails and | ||
479 | # Powerlevel10k has to fall back to using vcs_info. | ||
480 | typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 | ||
481 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 | ||
482 | typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 | ||
483 | |||
484 | ##########################[ status: exit code of the last command ]########################### | ||
485 | # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and | ||
486 | # style them independently from the regular OK and ERROR state. | ||
487 | typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true | ||
488 | |||
489 | # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as | ||
490 | # it will signify success by turning green. | ||
491 | typeset -g POWERLEVEL9K_STATUS_OK=false | ||
492 | typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 | ||
493 | typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' | ||
494 | |||
495 | # Status when some part of a pipe command fails but the overall exit status is zero. It may look | ||
496 | # like this: 1|0. | ||
497 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true | ||
498 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 | ||
499 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' | ||
500 | |||
501 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as | ||
502 | # it will signify error by turning red. | ||
503 | typeset -g POWERLEVEL9K_STATUS_ERROR=false | ||
504 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 | ||
505 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' | ||
506 | |||
507 | # Status when the last command was terminated by a signal. | ||
508 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true | ||
509 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 | ||
510 | # Use terse signal names: "INT" instead of "SIGINT(2)". | ||
511 | typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false | ||
512 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' | ||
513 | |||
514 | # Status when some part of a pipe command fails and the overall exit status is also non-zero. | ||
515 | # It may look like this: 1|0. | ||
516 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true | ||
517 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 | ||
518 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' | ||
519 | |||
520 | ###################[ command_execution_time: duration of the last command ]################### | ||
521 | # Show duration of the last command if takes at least this many seconds. | ||
522 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 | ||
523 | # Show this many fractional digits. Zero means round to seconds. | ||
524 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 | ||
525 | # Execution time color. | ||
526 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 | ||
527 | # Duration format: 1d 2h 3m 4s. | ||
528 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' | ||
529 | # Custom icon. | ||
530 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
531 | # Custom prefix. | ||
532 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' | ||
533 | |||
534 | #######################[ background_jobs: presence of background jobs ]####################### | ||
535 | # Don't show the number of background jobs. | ||
536 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false | ||
537 | # Background jobs color. | ||
538 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 | ||
539 | # Custom icon. | ||
540 | # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
541 | |||
542 | #######################[ direnv: direnv status (https://direnv.net/) ]######################## | ||
543 | # Direnv color. | ||
544 | typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 | ||
545 | # Custom icon. | ||
546 | # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
547 | |||
548 | ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### | ||
549 | # Default asdf color. Only used to display tools for which there is no color override (see below). | ||
550 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. | ||
551 | typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 | ||
552 | |||
553 | # There are four parameters that can be used to hide asdf tools. Each parameter describes | ||
554 | # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at | ||
555 | # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to | ||
556 | # hide a tool, it gets shown. | ||
557 | # | ||
558 | # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and | ||
559 | # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: | ||
560 | # | ||
561 | # asdf local python 3.8.1 | ||
562 | # asdf global python 3.8.1 | ||
563 | # | ||
564 | # After running both commands the current python version is 3.8.1 and its source is "local" as | ||
565 | # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, | ||
566 | # it'll hide python version in this case because 3.8.1 is the same as the global version. | ||
567 | # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't | ||
568 | # contain "local". | ||
569 | |||
570 | # Hide tool versions that don't come from one of these sources. | ||
571 | # | ||
572 | # Available sources: | ||
573 | # | ||
574 | # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" | ||
575 | # - local `asdf current` says "set by /some/not/home/directory/file" | ||
576 | # - global `asdf current` says "set by /home/username/file" | ||
577 | # | ||
578 | # Note: If this parameter is set to (shell local global), it won't hide tools. | ||
579 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. | ||
580 | typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) | ||
581 | |||
582 | # If set to false, hide tool versions that are the same as global. | ||
583 | # | ||
584 | # Note: The name of this parameter doesn't reflect its meaning at all. | ||
585 | # Note: If this parameter is set to true, it won't hide tools. | ||
586 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. | ||
587 | typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false | ||
588 | |||
589 | # If set to false, hide tool versions that are equal to "system". | ||
590 | # | ||
591 | # Note: If this parameter is set to true, it won't hide tools. | ||
592 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. | ||
593 | typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true | ||
594 | |||
595 | # If set to non-empty value, hide tools unless there is a file matching the specified file pattern | ||
596 | # in the current directory, or its parent directory, or its grandparent directory, and so on. | ||
597 | # | ||
598 | # Note: If this parameter is set to empty value, it won't hide tools. | ||
599 | # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. | ||
600 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. | ||
601 | # | ||
602 | # Example: Hide nodejs version when there is no package.json and no *.js files in the current | ||
603 | # directory, in `..`, in `../..` and so on. | ||
604 | # | ||
605 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' | ||
606 | typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= | ||
607 | |||
608 | # Ruby version from asdf. | ||
609 | typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 | ||
610 | # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
611 | # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
612 | |||
613 | # Python version from asdf. | ||
614 | typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 | ||
615 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
616 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
617 | |||
618 | # Go version from asdf. | ||
619 | typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 | ||
620 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
621 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
622 | |||
623 | # Node.js version from asdf. | ||
624 | typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 | ||
625 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
626 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
627 | |||
628 | # Rust version from asdf. | ||
629 | typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 | ||
630 | # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
631 | # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
632 | |||
633 | # .NET Core version from asdf. | ||
634 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 | ||
635 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
636 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
637 | |||
638 | # Flutter version from asdf. | ||
639 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 | ||
640 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
641 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
642 | |||
643 | # Lua version from asdf. | ||
644 | typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 | ||
645 | # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
646 | # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
647 | |||
648 | # Java version from asdf. | ||
649 | typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 | ||
650 | # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
651 | # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
652 | |||
653 | # Perl version from asdf. | ||
654 | typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 | ||
655 | # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
656 | # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
657 | |||
658 | # Erlang version from asdf. | ||
659 | typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 | ||
660 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
661 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
662 | |||
663 | # Elixir version from asdf. | ||
664 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 | ||
665 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
666 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
667 | |||
668 | # Postgres version from asdf. | ||
669 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 | ||
670 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
671 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
672 | |||
673 | # PHP version from asdf. | ||
674 | typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 | ||
675 | # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
676 | # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
677 | |||
678 | # Haskell version from asdf. | ||
679 | typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 | ||
680 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
681 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
682 | |||
683 | # Julia version from asdf. | ||
684 | typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 | ||
685 | # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
686 | # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' | ||
687 | |||
688 | ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### | ||
689 | # NordVPN connection indicator color. | ||
690 | typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 | ||
691 | # Hide NordVPN connection indicator when not connected. | ||
692 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= | ||
693 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= | ||
694 | # Custom icon. | ||
695 | # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
696 | |||
697 | #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## | ||
698 | # Ranger shell color. | ||
699 | typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 | ||
700 | # Custom icon. | ||
701 | # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
702 | |||
703 | ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### | ||
704 | # Nnn shell color. | ||
705 | typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 | ||
706 | # Custom icon. | ||
707 | # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
708 | |||
709 | ###########################[ vim_shell: vim shell indicator (:sh) ]########################### | ||
710 | # Vim shell indicator color. | ||
711 | typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 | ||
712 | # Custom icon. | ||
713 | # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
714 | |||
715 | ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### | ||
716 | # Midnight Commander shell color. | ||
717 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 | ||
718 | # Custom icon. | ||
719 | # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
720 | |||
721 | #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## | ||
722 | # Nix shell color. | ||
723 | typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 | ||
724 | |||
725 | # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. | ||
726 | # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= | ||
727 | |||
728 | # Custom icon. | ||
729 | # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
730 | |||
731 | ##################################[ disk_usage: disk usage ]################################## | ||
732 | # Colors for different levels of disk usage. | ||
733 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 | ||
734 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 | ||
735 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 | ||
736 | # Thresholds for different levels of disk usage (percentage points). | ||
737 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 | ||
738 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 | ||
739 | # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. | ||
740 | typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false | ||
741 | # Custom icon. | ||
742 | # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
743 | |||
744 | ######################################[ ram: free RAM ]####################################### | ||
745 | # RAM color. | ||
746 | typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 | ||
747 | # Custom icon. | ||
748 | # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
749 | |||
750 | #####################################[ swap: used swap ]###################################### | ||
751 | # Swap color. | ||
752 | typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 | ||
753 | # Custom icon. | ||
754 | # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
755 | |||
756 | ######################################[ load: CPU load ]###################################### | ||
757 | # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. | ||
758 | typeset -g POWERLEVEL9K_LOAD_WHICH=5 | ||
759 | # Load color when load is under 50%. | ||
760 | typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 | ||
761 | # Load color when load is between 50% and 70%. | ||
762 | typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 | ||
763 | # Load color when load is over 70%. | ||
764 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 | ||
765 | # Custom icon. | ||
766 | # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
767 | |||
768 | ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ | ||
769 | # Todo color. | ||
770 | typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 | ||
771 | # Hide todo when the total number of tasks is zero. | ||
772 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true | ||
773 | # Hide todo when the number of tasks after filtering is zero. | ||
774 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false | ||
775 | |||
776 | # Todo format. The following parameters are available within the expansion. | ||
777 | # | ||
778 | # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. | ||
779 | # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. | ||
780 | # | ||
781 | # These variables correspond to the last line of the output of `todo.sh -p ls`: | ||
782 | # | ||
783 | # TODO: 24 of 42 tasks shown | ||
784 | # | ||
785 | # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. | ||
786 | # | ||
787 | # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' | ||
788 | |||
789 | # Custom icon. | ||
790 | # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
791 | |||
792 | ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ | ||
793 | # Timewarrior color. | ||
794 | typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 | ||
795 | # If the tracked task is longer than 24 characters, truncate and append "…". | ||
796 | # Tip: To always display tasks without truncation, delete the following parameter. | ||
797 | # Tip: To hide task names and display just the icon when time tracking is enabled, set the | ||
798 | # value of the following parameter to "". | ||
799 | typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' | ||
800 | |||
801 | # Custom icon. | ||
802 | # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
803 | |||
804 | ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## | ||
805 | # Taskwarrior color. | ||
806 | typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 | ||
807 | |||
808 | # Taskwarrior segment format. The following parameters are available within the expansion. | ||
809 | # | ||
810 | # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. | ||
811 | # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. | ||
812 | # | ||
813 | # Zero values are represented as empty parameters. | ||
814 | # | ||
815 | # The default format: | ||
816 | # | ||
817 | # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' | ||
818 | # | ||
819 | # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' | ||
820 | |||
821 | # Custom icon. | ||
822 | # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
823 | |||
824 | ##################################[ context: user@hostname ]################################## | ||
825 | # Context color when running with privileges. | ||
826 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 | ||
827 | # Context color in SSH without privileges. | ||
828 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 | ||
829 | # Default context color (no privileges, no SSH). | ||
830 | typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 | ||
831 | |||
832 | # Context format when running with privileges: bold user@hostname. | ||
833 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' | ||
834 | # Context format when in SSH without privileges: user@hostname. | ||
835 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' | ||
836 | # Default context format (no privileges, no SSH): user@hostname. | ||
837 | typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' | ||
838 | |||
839 | # Don't show context unless running with privileges or in SSH. | ||
840 | # Tip: Remove the next line to always show context. | ||
841 | typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= | ||
842 | |||
843 | # Custom icon. | ||
844 | # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
845 | # Custom prefix. | ||
846 | # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' | ||
847 | |||
848 | ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### | ||
849 | # Python virtual environment color. | ||
850 | typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 | ||
851 | # Don't show Python version next to the virtual environment name. | ||
852 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false | ||
853 | # If set to "false", won't show virtualenv if pyenv is already shown. | ||
854 | # If set to "if-different", won't show virtualenv if it's the same as pyenv. | ||
855 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false | ||
856 | # Separate environment name from Python version only with a space. | ||
857 | typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= | ||
858 | # Custom icon. | ||
859 | # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
860 | |||
861 | #####################[ anaconda: conda environment (https://conda.io/) ]###################### | ||
862 | # Anaconda environment color. | ||
863 | typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 | ||
864 | |||
865 | # Anaconda segment format. The following parameters are available within the expansion. | ||
866 | # | ||
867 | # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. | ||
868 | # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. | ||
869 | # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). | ||
870 | # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). | ||
871 | # | ||
872 | # CONDA_PROMPT_MODIFIER can be configured with the following command: | ||
873 | # | ||
874 | # conda config --set env_prompt '({default_env}) ' | ||
875 | # | ||
876 | # The last argument is a Python format string that can use the following variables: | ||
877 | # | ||
878 | # - prefix The same as CONDA_PREFIX. | ||
879 | # - default_env The same as CONDA_DEFAULT_ENV. | ||
880 | # - name The last segment of CONDA_PREFIX. | ||
881 | # - stacked_env Comma-separated list of names in the environment stack. The first element is | ||
882 | # always the same as default_env. | ||
883 | # | ||
884 | # Note: '({default_env}) ' is the default value of env_prompt. | ||
885 | # | ||
886 | # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER | ||
887 | # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former | ||
888 | # is empty. | ||
889 | typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' | ||
890 | |||
891 | # Custom icon. | ||
892 | # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
893 | |||
894 | ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ | ||
895 | # Pyenv color. | ||
896 | typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 | ||
897 | # Hide python version if it doesn't come from one of these sources. | ||
898 | typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) | ||
899 | # If set to false, hide python version if it's the same as global: | ||
900 | # $(pyenv version-name) == $(pyenv global). | ||
901 | typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false | ||
902 | # If set to false, hide python version if it's equal to "system". | ||
903 | typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true | ||
904 | |||
905 | # Pyenv segment format. The following parameters are available within the expansion. | ||
906 | # | ||
907 | # - P9K_CONTENT Current pyenv environment (pyenv version-name). | ||
908 | # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). | ||
909 | # | ||
910 | # The default format has the following logic: | ||
911 | # | ||
912 | # 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not | ||
913 | # empty and unequal to $P9K_CONTENT. | ||
914 | # 2. Otherwise display just "$P9K_CONTENT". | ||
915 | typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' | ||
916 | |||
917 | # Custom icon. | ||
918 | # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
919 | |||
920 | ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ | ||
921 | # Goenv color. | ||
922 | typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 | ||
923 | # Hide go version if it doesn't come from one of these sources. | ||
924 | typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) | ||
925 | # If set to false, hide go version if it's the same as global: | ||
926 | # $(goenv version-name) == $(goenv global). | ||
927 | typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false | ||
928 | # If set to false, hide go version if it's equal to "system". | ||
929 | typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true | ||
930 | # Custom icon. | ||
931 | # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
932 | |||
933 | ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## | ||
934 | # Nodenv color. | ||
935 | typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 | ||
936 | # Hide node version if it doesn't come from one of these sources. | ||
937 | typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) | ||
938 | # If set to false, hide node version if it's the same as global: | ||
939 | # $(nodenv version-name) == $(nodenv global). | ||
940 | typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false | ||
941 | # If set to false, hide node version if it's equal to "system". | ||
942 | typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true | ||
943 | # Custom icon. | ||
944 | # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
945 | |||
946 | ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### | ||
947 | # Nvm color. | ||
948 | typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 | ||
949 | # Custom icon. | ||
950 | # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
951 | |||
952 | ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ | ||
953 | # Nodeenv color. | ||
954 | typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 | ||
955 | # Don't show Node version next to the environment name. | ||
956 | typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false | ||
957 | # Separate environment name from Node version only with a space. | ||
958 | typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= | ||
959 | # Custom icon. | ||
960 | # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
961 | |||
962 | ##############################[ node_version: node.js version ]############################### | ||
963 | # Node version color. | ||
964 | typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 | ||
965 | # Show node version only when in a directory tree containing package.json. | ||
966 | typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true | ||
967 | # Custom icon. | ||
968 | # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
969 | |||
970 | #######################[ go_version: go version (https://golang.org) ]######################## | ||
971 | # Go version color. | ||
972 | typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 | ||
973 | # Show go version only when in a go project subdirectory. | ||
974 | typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true | ||
975 | # Custom icon. | ||
976 | # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
977 | |||
978 | #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## | ||
979 | # Rust version color. | ||
980 | typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 | ||
981 | # Show rust version only when in a rust project subdirectory. | ||
982 | typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true | ||
983 | # Custom icon. | ||
984 | # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
985 | |||
986 | ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ | ||
987 | # .NET version color. | ||
988 | typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 | ||
989 | # Show .NET version only when in a .NET project subdirectory. | ||
990 | typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true | ||
991 | # Custom icon. | ||
992 | # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
993 | |||
994 | #####################[ php_version: php version (https://www.php.net/) ]###################### | ||
995 | # PHP version color. | ||
996 | typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 | ||
997 | # Show PHP version only when in a PHP project subdirectory. | ||
998 | typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true | ||
999 | # Custom icon. | ||
1000 | # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1001 | |||
1002 | ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### | ||
1003 | # Laravel version color. | ||
1004 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 | ||
1005 | # Custom icon. | ||
1006 | # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1007 | |||
1008 | ####################[ java_version: java version (https://www.java.com/) ]#################### | ||
1009 | # Java version color. | ||
1010 | typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 | ||
1011 | # Show java version only when in a java project subdirectory. | ||
1012 | typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true | ||
1013 | # Show brief version. | ||
1014 | typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false | ||
1015 | # Custom icon. | ||
1016 | # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1017 | |||
1018 | ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### | ||
1019 | # Package color. | ||
1020 | typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 | ||
1021 | # Package format. The following parameters are available within the expansion. | ||
1022 | # | ||
1023 | # - P9K_PACKAGE_NAME The value of `name` field in package.json. | ||
1024 | # - P9K_PACKAGE_VERSION The value of `version` field in package.json. | ||
1025 | # | ||
1026 | # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' | ||
1027 | # Custom icon. | ||
1028 | # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1029 | |||
1030 | #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## | ||
1031 | # Rbenv color. | ||
1032 | typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 | ||
1033 | # Hide ruby version if it doesn't come from one of these sources. | ||
1034 | typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) | ||
1035 | # If set to false, hide ruby version if it's the same as global: | ||
1036 | # $(rbenv version-name) == $(rbenv global). | ||
1037 | typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false | ||
1038 | # If set to false, hide ruby version if it's equal to "system". | ||
1039 | typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true | ||
1040 | # Custom icon. | ||
1041 | # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1042 | |||
1043 | #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## | ||
1044 | # Rvm color. | ||
1045 | typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 | ||
1046 | # Don't show @gemset at the end. | ||
1047 | typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false | ||
1048 | # Don't show ruby- at the front. | ||
1049 | typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false | ||
1050 | # Custom icon. | ||
1051 | # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1052 | |||
1053 | ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ | ||
1054 | # Fvm color. | ||
1055 | typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 | ||
1056 | # Custom icon. | ||
1057 | # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1058 | |||
1059 | ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### | ||
1060 | # Lua color. | ||
1061 | typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 | ||
1062 | # Hide lua version if it doesn't come from one of these sources. | ||
1063 | typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) | ||
1064 | # If set to false, hide lua version if it's the same as global: | ||
1065 | # $(luaenv version-name) == $(luaenv global). | ||
1066 | typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false | ||
1067 | # If set to false, hide lua version if it's equal to "system". | ||
1068 | typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true | ||
1069 | # Custom icon. | ||
1070 | # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1071 | |||
1072 | ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ | ||
1073 | # Java color. | ||
1074 | typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 | ||
1075 | # Hide java version if it doesn't come from one of these sources. | ||
1076 | typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) | ||
1077 | # If set to false, hide java version if it's the same as global: | ||
1078 | # $(jenv version-name) == $(jenv global). | ||
1079 | typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false | ||
1080 | # If set to false, hide java version if it's equal to "system". | ||
1081 | typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true | ||
1082 | # Custom icon. | ||
1083 | # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1084 | |||
1085 | ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ | ||
1086 | # Perl color. | ||
1087 | typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 | ||
1088 | # Hide perl version if it doesn't come from one of these sources. | ||
1089 | typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) | ||
1090 | # If set to false, hide perl version if it's the same as global: | ||
1091 | # $(plenv version-name) == $(plenv global). | ||
1092 | typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false | ||
1093 | # If set to false, hide perl version if it's equal to "system". | ||
1094 | typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true | ||
1095 | # Custom icon. | ||
1096 | # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1097 | |||
1098 | ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ | ||
1099 | # PHP color. | ||
1100 | typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 | ||
1101 | # Hide php version if it doesn't come from one of these sources. | ||
1102 | typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) | ||
1103 | # If set to false, hide php version if it's the same as global: | ||
1104 | # $(phpenv version-name) == $(phpenv global). | ||
1105 | typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false | ||
1106 | # If set to false, hide php version if it's equal to "system". | ||
1107 | typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true | ||
1108 | # Custom icon. | ||
1109 | # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1110 | |||
1111 | #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### | ||
1112 | # Scala color. | ||
1113 | typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 | ||
1114 | # Hide scala version if it doesn't come from one of these sources. | ||
1115 | typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) | ||
1116 | # If set to false, hide scala version if it's the same as global: | ||
1117 | # $(scalaenv version-name) == $(scalaenv global). | ||
1118 | typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false | ||
1119 | # If set to false, hide scala version if it's equal to "system". | ||
1120 | typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true | ||
1121 | # Custom icon. | ||
1122 | # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1123 | |||
1124 | ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### | ||
1125 | # Haskell color. | ||
1126 | typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 | ||
1127 | # Hide haskell version if it doesn't come from one of these sources. | ||
1128 | # | ||
1129 | # shell: version is set by STACK_YAML | ||
1130 | # local: version is set by stack.yaml up the directory tree | ||
1131 | # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) | ||
1132 | typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) | ||
1133 | # If set to false, hide haskell version if it's the same as in the implicit global project. | ||
1134 | typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true | ||
1135 | # Custom icon. | ||
1136 | # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1137 | |||
1138 | #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# | ||
1139 | # Show kubecontext only when the the command you are typing invokes one of these tools. | ||
1140 | # Tip: Remove the next line to always show kubecontext. | ||
1141 | typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile' | ||
1142 | |||
1143 | # Kubernetes context classes for the purpose of using different colors, icons and expansions with | ||
1144 | # different contexts. | ||
1145 | # | ||
1146 | # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element | ||
1147 | # in each pair defines a pattern against which the current kubernetes context gets matched. | ||
1148 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) | ||
1149 | # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, | ||
1150 | # you'll see this value in your prompt. The second element of each pair in | ||
1151 | # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The | ||
1152 | # first match wins. | ||
1153 | # | ||
1154 | # For example, given these settings: | ||
1155 | # | ||
1156 | # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( | ||
1157 | # '*prod*' PROD | ||
1158 | # '*test*' TEST | ||
1159 | # '*' DEFAULT) | ||
1160 | # | ||
1161 | # If your current kubernetes context is "deathray-testing/default", its class is TEST | ||
1162 | # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. | ||
1163 | # | ||
1164 | # You can define different colors, icons and content expansions for different classes: | ||
1165 | # | ||
1166 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 | ||
1167 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1168 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' | ||
1169 | typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( | ||
1170 | # '*prod*' PROD # These values are examples that are unlikely | ||
1171 | # '*test*' TEST # to match your needs. Customize them as needed. | ||
1172 | '*' DEFAULT) | ||
1173 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 | ||
1174 | # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1175 | |||
1176 | # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext | ||
1177 | # segment. Parameter expansions are very flexible and fast, too. See reference: | ||
1178 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. | ||
1179 | # | ||
1180 | # Within the expansion the following parameters are always available: | ||
1181 | # | ||
1182 | # - P9K_CONTENT The content that would've been displayed if there was no content | ||
1183 | # expansion defined. | ||
1184 | # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the | ||
1185 | # output of `kubectl config get-contexts`. | ||
1186 | # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the | ||
1187 | # output of `kubectl config get-contexts`. | ||
1188 | # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE | ||
1189 | # in the output of `kubectl config get-contexts`. If there is no | ||
1190 | # namespace, the parameter is set to "default". | ||
1191 | # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the | ||
1192 | # output of `kubectl config get-contexts`. | ||
1193 | # | ||
1194 | # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), | ||
1195 | # the following extra parameters are available: | ||
1196 | # | ||
1197 | # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". | ||
1198 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. | ||
1199 | # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. | ||
1200 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. | ||
1201 | # | ||
1202 | # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, | ||
1203 | # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": | ||
1204 | # | ||
1205 | # - P9K_KUBECONTEXT_CLOUD_NAME=gke | ||
1206 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account | ||
1207 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a | ||
1208 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 | ||
1209 | # | ||
1210 | # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": | ||
1211 | # | ||
1212 | # - P9K_KUBECONTEXT_CLOUD_NAME=eks | ||
1213 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 | ||
1214 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 | ||
1215 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 | ||
1216 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= | ||
1217 | # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. | ||
1218 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' | ||
1219 | # Append the current context's namespace if it's not "default". | ||
1220 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' | ||
1221 | |||
1222 | # Custom prefix. | ||
1223 | # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' | ||
1224 | |||
1225 | ################[ terraform: terraform workspace (https://www.terraform.io) ]################# | ||
1226 | # Don't show terraform workspace if it's literally "default". | ||
1227 | typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false | ||
1228 | # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element | ||
1229 | # in each pair defines a pattern against which the current terraform workspace gets matched. | ||
1230 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) | ||
1231 | # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, | ||
1232 | # you'll see this value in your prompt. The second element of each pair in | ||
1233 | # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The | ||
1234 | # first match wins. | ||
1235 | # | ||
1236 | # For example, given these settings: | ||
1237 | # | ||
1238 | # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( | ||
1239 | # '*prod*' PROD | ||
1240 | # '*test*' TEST | ||
1241 | # '*' OTHER) | ||
1242 | # | ||
1243 | # If your current terraform workspace is "project_test", its class is TEST because "project_test" | ||
1244 | # doesn't match the pattern '*prod*' but does match '*test*'. | ||
1245 | # | ||
1246 | # You can define different colors, icons and content expansions for different classes: | ||
1247 | # | ||
1248 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 | ||
1249 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1250 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' | ||
1251 | typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( | ||
1252 | # '*prod*' PROD # These values are examples that are unlikely | ||
1253 | # '*test*' TEST # to match your needs. Customize them as needed. | ||
1254 | '*' OTHER) | ||
1255 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 | ||
1256 | # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1257 | |||
1258 | #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# | ||
1259 | # Show aws only when the the command you are typing invokes one of these tools. | ||
1260 | # Tip: Remove the next line to always show aws. | ||
1261 | typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' | ||
1262 | |||
1263 | # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element | ||
1264 | # in each pair defines a pattern against which the current AWS profile gets matched. | ||
1265 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) | ||
1266 | # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, | ||
1267 | # you'll see this value in your prompt. The second element of each pair in | ||
1268 | # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The | ||
1269 | # first match wins. | ||
1270 | # | ||
1271 | # For example, given these settings: | ||
1272 | # | ||
1273 | # typeset -g POWERLEVEL9K_AWS_CLASSES=( | ||
1274 | # '*prod*' PROD | ||
1275 | # '*test*' TEST | ||
1276 | # '*' DEFAULT) | ||
1277 | # | ||
1278 | # If your current AWS profile is "company_test", its class is TEST | ||
1279 | # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. | ||
1280 | # | ||
1281 | # You can define different colors, icons and content expansions for different classes: | ||
1282 | # | ||
1283 | # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 | ||
1284 | # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1285 | # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' | ||
1286 | typeset -g POWERLEVEL9K_AWS_CLASSES=( | ||
1287 | # '*prod*' PROD # These values are examples that are unlikely | ||
1288 | # '*test*' TEST # to match your needs. Customize them as needed. | ||
1289 | '*' DEFAULT) | ||
1290 | typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 | ||
1291 | # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1292 | |||
1293 | #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# | ||
1294 | # AWS Elastic Beanstalk environment color. | ||
1295 | typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 | ||
1296 | # Custom icon. | ||
1297 | # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1298 | |||
1299 | ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## | ||
1300 | # Show azure only when the the command you are typing invokes one of these tools. | ||
1301 | # Tip: Remove the next line to always show azure. | ||
1302 | typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' | ||
1303 | # Azure account name color. | ||
1304 | typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 | ||
1305 | # Custom icon. | ||
1306 | # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1307 | |||
1308 | ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### | ||
1309 | # Show gcloud only when the the command you are typing invokes one of these tools. | ||
1310 | # Tip: Remove the next line to always show gcloud. | ||
1311 | typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' | ||
1312 | # Google cloud color. | ||
1313 | typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 | ||
1314 | |||
1315 | # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or | ||
1316 | # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative | ||
1317 | # enough. You can use the following parameters in the expansions. Each of them corresponds to the | ||
1318 | # output of `gcloud` tool. | ||
1319 | # | ||
1320 | # Parameter | Source | ||
1321 | # -------------------------|-------------------------------------------------------------------- | ||
1322 | # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' | ||
1323 | # P9K_GCLOUD_ACCOUNT | gcloud config get-value account | ||
1324 | # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project | ||
1325 | # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' | ||
1326 | # | ||
1327 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. | ||
1328 | # | ||
1329 | # Obtaining project name requires sending a request to Google servers. This can take a long time | ||
1330 | # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud | ||
1331 | # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets | ||
1332 | # set and gcloud prompt segment transitions to state COMPLETE. | ||
1333 | # | ||
1334 | # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL | ||
1335 | # and COMPLETE. You can also hide gcloud in state PARTIAL by setting | ||
1336 | # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and | ||
1337 | # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. | ||
1338 | typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' | ||
1339 | typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' | ||
1340 | |||
1341 | # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name | ||
1342 | # this often. Negative value disables periodic polling. In this mode project name is retrieved | ||
1343 | # only when the current configuration, account or project id changes. | ||
1344 | typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 | ||
1345 | |||
1346 | # Custom icon. | ||
1347 | # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1348 | |||
1349 | #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# | ||
1350 | # Show google_app_cred only when the the command you are typing invokes one of these tools. | ||
1351 | # Tip: Remove the next line to always show google_app_cred. | ||
1352 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' | ||
1353 | |||
1354 | # Google application credentials classes for the purpose of using different colors, icons and | ||
1355 | # expansions with different credentials. | ||
1356 | # | ||
1357 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first | ||
1358 | # element in each pair defines a pattern against which the current kubernetes context gets | ||
1359 | # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion | ||
1360 | # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION | ||
1361 | # parameters, you'll see this value in your prompt. The second element of each pair in | ||
1362 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. | ||
1363 | # The first match wins. | ||
1364 | # | ||
1365 | # For example, given these settings: | ||
1366 | # | ||
1367 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( | ||
1368 | # '*:*prod*:*' PROD | ||
1369 | # '*:*test*:*' TEST | ||
1370 | # '*' DEFAULT) | ||
1371 | # | ||
1372 | # If your current Google application credentials is "service_account deathray-testing x@y.com", | ||
1373 | # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. | ||
1374 | # | ||
1375 | # You can define different colors, icons and content expansions for different classes: | ||
1376 | # | ||
1377 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 | ||
1378 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1379 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' | ||
1380 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( | ||
1381 | # '*:*prod*:*' PROD # These values are examples that are unlikely | ||
1382 | # '*:*test*:*' TEST # to match your needs. Customize them as needed. | ||
1383 | '*' DEFAULT) | ||
1384 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 | ||
1385 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1386 | |||
1387 | # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by | ||
1388 | # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: | ||
1389 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. | ||
1390 | # | ||
1391 | # You can use the following parameters in the expansion. Each of them corresponds to one of the | ||
1392 | # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. | ||
1393 | # | ||
1394 | # Parameter | JSON key file field | ||
1395 | # ---------------------------------+--------------- | ||
1396 | # P9K_GOOGLE_APP_CRED_TYPE | type | ||
1397 | # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id | ||
1398 | # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email | ||
1399 | # | ||
1400 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. | ||
1401 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' | ||
1402 | |||
1403 | ###############################[ public_ip: public IP address ]############################### | ||
1404 | # Public IP color. | ||
1405 | typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 | ||
1406 | # Custom icon. | ||
1407 | # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1408 | |||
1409 | ########################[ vpn_ip: virtual private network indicator ]######################### | ||
1410 | # VPN IP color. | ||
1411 | typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 | ||
1412 | # When on VPN, show just an icon without the IP address. | ||
1413 | # Tip: To display the private IP address when on VPN, remove the next line. | ||
1414 | typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= | ||
1415 | # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN | ||
1416 | # to see the name of the interface. | ||
1417 | typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*' | ||
1418 | # If set to true, show one segment per matching network interface. If set to false, show only | ||
1419 | # one segment corresponding to the first matching network interface. | ||
1420 | # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. | ||
1421 | typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false | ||
1422 | # Custom icon. | ||
1423 | # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1424 | |||
1425 | ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### | ||
1426 | # IP color. | ||
1427 | typeset -g POWERLEVEL9K_IP_FOREGROUND=38 | ||
1428 | # The following parameters are accessible within the expansion: | ||
1429 | # | ||
1430 | # Parameter | Meaning | ||
1431 | # ----------------------+--------------- | ||
1432 | # P9K_IP_IP | IP address | ||
1433 | # P9K_IP_INTERFACE | network interface | ||
1434 | # P9K_IP_RX_BYTES | total number of bytes received | ||
1435 | # P9K_IP_TX_BYTES | total number of bytes sent | ||
1436 | # P9K_IP_RX_RATE | receive rate (since last prompt) | ||
1437 | # P9K_IP_TX_RATE | send rate (since last prompt) | ||
1438 | typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}' | ||
1439 | # Show information for the first network interface whose name matches this regular expression. | ||
1440 | # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. | ||
1441 | typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' | ||
1442 | # Custom icon. | ||
1443 | # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1444 | |||
1445 | #########################[ proxy: system-wide http/https/ftp proxy ]########################## | ||
1446 | # Proxy color. | ||
1447 | typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 | ||
1448 | # Custom icon. | ||
1449 | # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1450 | |||
1451 | ################################[ battery: internal battery ]################################# | ||
1452 | # Show battery in red when it's below this level and not connected to power supply. | ||
1453 | typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 | ||
1454 | typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 | ||
1455 | # Show battery in green when it's charging or fully charged. | ||
1456 | typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 | ||
1457 | # Show battery in yellow when it's discharging. | ||
1458 | typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 | ||
1459 | # Battery pictograms going from low to high level of charge. | ||
1460 | typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' | ||
1461 | # Don't show the remaining time to charge/discharge. | ||
1462 | typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false | ||
1463 | |||
1464 | #####################################[ wifi: wifi speed ]##################################### | ||
1465 | # WiFi color. | ||
1466 | typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 | ||
1467 | # Custom icon. | ||
1468 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1469 | |||
1470 | # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). | ||
1471 | # | ||
1472 | # # Wifi colors and icons for different signal strength levels (low to high). | ||
1473 | # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values | ||
1474 | # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values | ||
1475 | # | ||
1476 | # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' | ||
1477 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' | ||
1478 | # | ||
1479 | # The following parameters are accessible within the expansions: | ||
1480 | # | ||
1481 | # Parameter | Meaning | ||
1482 | # ----------------------+--------------- | ||
1483 | # P9K_WIFI_SSID | service set identifier, a.k.a. network name | ||
1484 | # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown | ||
1485 | # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second | ||
1486 | # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 | ||
1487 | # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 | ||
1488 | # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) | ||
1489 | |||
1490 | ####################################[ time: current time ]#################################### | ||
1491 | # Current time color. | ||
1492 | typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 | ||
1493 | # Format for the current time: 09:51:02. See `man 3 strftime`. | ||
1494 | typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' | ||
1495 | # If set to true, time will update when you hit enter. This way prompts for the past | ||
1496 | # commands will contain the start times of their commands as opposed to the default | ||
1497 | # behavior where they contain the end times of their preceding commands. | ||
1498 | typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false | ||
1499 | # Custom icon. | ||
1500 | # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1501 | # Custom prefix. | ||
1502 | # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' | ||
1503 | |||
1504 | # Example of a user-defined prompt segment. Function prompt_example will be called on every | ||
1505 | # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or | ||
1506 | # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. | ||
1507 | # | ||
1508 | # Type `p10k help segment` for documentation and a more sophisticated example. | ||
1509 | function prompt_example() { | ||
1510 | p10k segment -f 208 -i '⭐' -t 'hello, %n' | ||
1511 | } | ||
1512 | |||
1513 | # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job | ||
1514 | # is to generate the prompt segment for display in instant prompt. See | ||
1515 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. | ||
1516 | # | ||
1517 | # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function | ||
1518 | # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k | ||
1519 | # will replay these calls without actually calling instant_prompt_*. It is imperative that | ||
1520 | # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this | ||
1521 | # rule is not observed, the content of instant prompt will be incorrect. | ||
1522 | # | ||
1523 | # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If | ||
1524 | # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. | ||
1525 | function instant_prompt_example() { | ||
1526 | # Since prompt_example always makes the same `p10k segment` calls, we can call it from | ||
1527 | # instant_prompt_example. This will give us the same `example` prompt segment in the instant | ||
1528 | # and regular prompts. | ||
1529 | prompt_example | ||
1530 | } | ||
1531 | |||
1532 | # User-defined prompt segments can be customized the same way as built-in segments. | ||
1533 | # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 | ||
1534 | # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' | ||
1535 | |||
1536 | # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt | ||
1537 | # when accepting a command line. Supported values: | ||
1538 | # | ||
1539 | # - off: Don't change prompt when accepting a command line. | ||
1540 | # - always: Trim down prompt when accepting a command line. | ||
1541 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command | ||
1542 | # typed after changing current working directory. | ||
1543 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always | ||
1544 | |||
1545 | # Instant prompt mode. | ||
1546 | # | ||
1547 | # - off: Disable instant prompt. Choose this if you've tried instant prompt and found | ||
1548 | # it incompatible with your zsh configuration files. | ||
1549 | # - quiet: Enable instant prompt and don't print warnings when detecting console output | ||
1550 | # during zsh initialization. Choose this if you've read and understood | ||
1551 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. | ||
1552 | # - verbose: Enable instant prompt and print a warning when detecting console output during | ||
1553 | # zsh initialization. Choose this if you've never tried instant prompt, haven't | ||
1554 | # seen the warning, or if you are unsure what this all means. | ||
1555 | typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet | ||
1556 | |||
1557 | # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. | ||
1558 | # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload | ||
1559 | # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you | ||
1560 | # really need it. | ||
1561 | typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true | ||
1562 | |||
1563 | # If p10k is already loaded, reload configuration. | ||
1564 | # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. | ||
1565 | (( ! $+functions[p10k] )) || p10k reload | ||
1566 | } | ||
1567 | |||
1568 | # Tell `p10k configure` which file it should overwrite. | ||
1569 | typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} | ||
1570 | |||
1571 | (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} | ||
1572 | 'builtin' 'unset' 'p10k_config_opts' | ||