You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1578 lines
80KB

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