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

1611 lines
82 KiB

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