p10k.zsh 80 KB

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