my xfce4 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.

1722 lines
88 KiB

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