My dotfiles
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.

1647 lines
84 KiB

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