Guest User

p10k

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