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

1634 lines
84 KiB

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