Advertisement
oOBATOo

~/.p10k.zsh

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