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