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