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