Advertisement
Guest User

p10k config

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