├── .bash-presets ├── .bashrc-manjaro └── .bashrc-wsl ├── .gitattributes ├── .gitignore ├── .patches └── bashrc-patch.ed ├── README.md ├── bash └── .bash_aliases ├── deps-arch.sh ├── deps-ubuntu.sh ├── p10k └── .p10k.zsh ├── setup.sh ├── shell-shared ├── .shared_aliases └── .shared_env └── zsh ├── .zshenv ├── .zshrc └── zsh └── aliasrc /.bash-presets/.bashrc-manjaro: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bashrc 3 | # 4 | 5 | [[ $- != *i* ]] && return 6 | 7 | colors() { 8 | local fgc bgc vals seq0 9 | 10 | printf "Color escapes are %s\n" '\e[${value};...;${value}m' 11 | printf "Values 30..37 are \e[33mforeground colors\e[m\n" 12 | printf "Values 40..47 are \e[43mbackground colors\e[m\n" 13 | printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n" 14 | 15 | # foreground colors 16 | for fgc in {30..37}; do 17 | # background colors 18 | for bgc in {40..47}; do 19 | fgc=${fgc#37} # white 20 | bgc=${bgc#40} # black 21 | 22 | vals="${fgc:+$fgc;}${bgc}" 23 | vals=${vals%%;} 24 | 25 | seq0="${vals:+\e[${vals}m}" 26 | printf " %-9s" "${seq0:-(default)}" 27 | printf " ${seq0}TEXT\e[m" 28 | printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m" 29 | done 30 | echo; echo 31 | done 32 | } 33 | 34 | [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion 35 | 36 | # Change the window title of X terminals 37 | case ${TERM} in 38 | xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) 39 | PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' 40 | ;; 41 | screen*) 42 | PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' 43 | ;; 44 | esac 45 | 46 | use_color=true 47 | 48 | # Set colorful PS1 only on colorful terminals. 49 | # dircolors --print-database uses its own built-in database 50 | # instead of using /etc/DIR_COLORS. Try to use the external file 51 | # first to take advantage of user additions. Use internal bash 52 | # globbing instead of external grep binary. 53 | safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM 54 | match_lhs="" 55 | [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" 56 | [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ 59 | && match_lhs=$(dircolors --print-database) 60 | [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true 61 | 62 | if ${use_color} ; then 63 | # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 64 | if type -P dircolors >/dev/null ; then 65 | if [[ -f ~/.dir_colors ]] ; then 66 | eval $(dircolors -b ~/.dir_colors) 67 | elif [[ -f /etc/DIR_COLORS ]] ; then 68 | eval $(dircolors -b /etc/DIR_COLORS) 69 | fi 70 | fi 71 | 72 | if [[ ${EUID} == 0 ]] ; then 73 | PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] ' 74 | else 75 | PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' 76 | fi 77 | 78 | alias ls='ls --color=auto' 79 | alias grep='grep --colour=auto' 80 | alias egrep='egrep --colour=auto' 81 | alias fgrep='fgrep --colour=auto' 82 | else 83 | if [[ ${EUID} == 0 ]] ; then 84 | # show root@ when we don't have colors 85 | PS1='\u@\h \W \$ ' 86 | else 87 | PS1='\u@\h \w \$ ' 88 | fi 89 | fi 90 | 91 | unset use_color safe_term match_lhs sh 92 | 93 | alias cp="cp -i" # confirm before overwriting something 94 | alias df='df -h' # human-readable sizes 95 | alias free='free -m' # show sizes in MB 96 | alias np='nano -w PKGBUILD' 97 | alias more=less 98 | 99 | xhost +local:root > /dev/null 2>&1 100 | 101 | # Bash won't get SIGWINCH if another process is in the foreground. 102 | # Enable checkwinsize so that bash will check the terminal size when 103 | # it regains control. #65623 104 | # http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) 105 | shopt -s checkwinsize 106 | 107 | shopt -s expand_aliases 108 | 109 | # export QT_SELECT=4 110 | 111 | # Enable history appending instead of overwriting. #139609 112 | shopt -s histappend 113 | 114 | # 115 | # # ex - archive extractor 116 | # # usage: ex 117 | ex () 118 | { 119 | if [ -f $1 ] ; then 120 | case $1 in 121 | *.tar.bz2) tar xjf $1 ;; 122 | *.tar.gz) tar xzf $1 ;; 123 | *.bz2) bunzip2 $1 ;; 124 | *.rar) unrar x $1 ;; 125 | *.gz) gunzip $1 ;; 126 | *.tar) tar xf $1 ;; 127 | *.tbz2) tar xjf $1 ;; 128 | *.tgz) tar xzf $1 ;; 129 | *.zip) unzip $1 ;; 130 | *.Z) uncompress $1;; 131 | *.7z) 7z x $1 ;; 132 | *) echo "'$1' cannot be extracted via ex()" ;; 133 | esac 134 | else 135 | echo "'$1' is not a valid file" 136 | fi 137 | } 138 | -------------------------------------------------------------------------------- /.bash-presets/.bashrc-wsl: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return;; 9 | esac 10 | 11 | # don't put duplicate lines or lines starting with space in the history. 12 | # See bash(1) for more options 13 | HISTCONTROL=ignoreboth 14 | 15 | # append to the history file, don't overwrite it 16 | shopt -s histappend 17 | 18 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 19 | HISTSIZE=1000 20 | HISTFILESIZE=2000 21 | 22 | # check the window size after each command and, if necessary, 23 | # update the values of LINES and COLUMNS. 24 | shopt -s checkwinsize 25 | 26 | # If set, the pattern "**" used in a pathname expansion context will 27 | # match all files and zero or more directories and subdirectories. 28 | #shopt -s globstar 29 | 30 | # make less more friendly for non-text input files, see lesspipe(1) 31 | [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 32 | 33 | # set variable identifying the chroot you work in (used in the prompt below) 34 | if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 35 | debian_chroot=$(cat /etc/debian_chroot) 36 | fi 37 | 38 | # set a fancy prompt (non-color, unless we know we "want" color) 39 | case "$TERM" in 40 | xterm-color|*-256color) color_prompt=yes;; 41 | esac 42 | 43 | # uncomment for a colored prompt, if the terminal has the capability; turned 44 | # off by default to not distract the user: the focus in a terminal window 45 | # should be on the output of commands, not on the prompt 46 | #force_color_prompt=yes 47 | 48 | if [ -n "$force_color_prompt" ]; then 49 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 50 | # We have color support; assume it's compliant with Ecma-48 51 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 52 | # a case would tend to support setf rather than setaf.) 53 | color_prompt=yes 54 | else 55 | color_prompt= 56 | fi 57 | fi 58 | 59 | if [ "$color_prompt" = yes ]; then 60 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 61 | else 62 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 63 | fi 64 | unset color_prompt force_color_prompt 65 | 66 | # If this is an xterm set the title to user@host:dir 67 | case "$TERM" in 68 | xterm*|rxvt*) 69 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 70 | ;; 71 | *) 72 | ;; 73 | esac 74 | 75 | # enable color support of ls and also add handy aliases 76 | if [ -x /usr/bin/dircolors ]; then 77 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 78 | alias ls='exa --color=always --group-directories-first' 79 | 80 | alias grep='grep --color=auto' 81 | alias fgrep='fgrep --color=auto' 82 | alias egrep='egrep --color=auto' 83 | fi 84 | 85 | # colored GCC warnings and errors 86 | #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 87 | 88 | # Add an "alert" alias for long running commands. Use like so: 89 | # sleep 10; alert 90 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' 91 | 92 | # Alias definitions. 93 | # You may want to put all your additions into a separate file like 94 | # ~/.bash_aliases, instead of adding them here directly. 95 | # See /usr/share/doc/bash-doc/examples in the bash-doc package. 96 | 97 | if [ -f ~/.bash_aliases ]; then 98 | . ~/.bash_aliases 99 | fi 100 | 101 | # enable programmable completion features (you don't need to enable 102 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 103 | # sources /etc/bash.bashrc). 104 | if ! shopt -oq posix; then 105 | if [ -f /usr/share/bash-completion/bash_completion ]; then 106 | . /usr/share/bash-completion/bash_completion 107 | elif [ -f /etc/bash_completion ]; then 108 | . /etc/bash_completion 109 | fi 110 | fi 111 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | text eol=lf 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bash/.bashrc 2 | -------------------------------------------------------------------------------- /.patches/bashrc-patch.ed: -------------------------------------------------------------------------------- 1 | # Activate verbose mode 2 | H 3 | # Remove (l, la, ll) ls aliases (if any) 4 | g/alias l[al]\?=/d 5 | # Remove all comments regarding ls aliases 6 | g/#.*ls aliases/d 7 | # Save changes 8 | w 9 | # Add env setup to the start of the file 10 | 0a 11 | ###################################################################### 12 | ################ Setup environment variables ####################### 13 | ###################################################################### 14 | 15 | [ ! -f ~/.shared_env ] || . ~/.shared_env 16 | 17 | ###################################################################### 18 | ##################### Default settings ############################# 19 | ###################################################################### 20 | . 21 | w 22 | # Add custom config to the end of the file 23 | $a 24 | 25 | 26 | ###################################################################### 27 | ##################### Custom settings ############################## 28 | ###################################################################### 29 | 30 | # some more ls aliases 31 | alias la='ls -al' 32 | alias l='la' 33 | alias ll='ls -l' 34 | . 35 | w 36 | # If the ls alias is not present in the file, add it to the end 37 | # (this is to make sure that the ls alias change to exa does not result in an error) 38 | r !if [ -z "$(grep 'alias ls=' %)" ]; then echo -e "\nalias ls="; fi 39 | # If a call to .bash_aliases is not present in the file, add it to the end 40 | r !if [ -z "$(grep '~/.bash_aliases' %)" ]; then echo -e "\n[ ! -f ~/.bash_aliases ] || . ~/.bash_aliases"; fi 41 | a 42 | 43 | # Load zoxide if installed, else load autojump 44 | if exists zoxide 45 | then 46 | eval "$(zoxide init bash)" 47 | else 48 | source /usr/share/autojump/autojump.bash 2>/dev/null 49 | fi 50 | 51 | # Load nvm 52 | if [ -s "$NVM_DIR/nvm.sh" ] 53 | then 54 | . "$NVM_DIR/nvm.sh" # This loads nvm 55 | fi 56 | . 57 | w 58 | # If neofetch is not present in the file, add it to the end 59 | r !if [ -z "$(grep 'neofetch' %)" ]; then echo "\nneofetch"; fi 60 | w 61 | # Change ls alias to use exa 62 | ,s/alias ls=.*$/alias ls='exa --color=always --group-directories-first'/ 63 | # Save changes and quit 64 | w 65 | q 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | 3 | ## Table of contents 4 | - [Dependencies](#dependencies) 5 | - [System Packages](#system-packages) 6 | - [Ubuntu](#ubuntu) 7 | - [Arch](#arch) 8 | - [Git Repositories](#git-repositories) 9 | - [Other Packages](#other-packages) 10 | - [Cargo](#cargo) 11 | - [Go](#go) 12 | - [Installation Script](#installation-script) 13 | - [Ubuntu](#ubuntu-1) 14 | - [Arch](#arch-1) 15 | - [Change shell to ZSH (Optional)](#change-shell-to-zsh-optional) 16 | - [How to clone this repo](#how-to-clone-this-repo) 17 | - [Packages needed](#packages-needed) 18 | - [Ubuntu](#ubuntu-2) 19 | - [Arch](#arch-2) 20 | - [Script](#script) 21 | - [Explanation](#explanation) 22 | 23 | ## Dependencies 24 | ### System Packages 25 | #### Ubuntu 26 | - [autojump](https://github.com/wting/autojump) *(Ubuntu 20.10 or earlier)* 27 | - [zoxide](https://github.com/ajeetdsouza/zoxide) *(Ubuntu 21.04 or later)* 28 | - neofetch 29 | - zsh 30 | - zsh-syntax-highlighting 31 | - zsh-autosuggestions 32 | - cargo *(Ubuntu 20.04 or earlier)* 33 | - [eza](https://github.com/eza-community/eza) *(Ubuntu 20.10 or later)* 34 | - [bat](https://github.com/sharkdp/bat) 35 | 36 | #### Arch 37 | ##### Pacman 38 | 39 | - [neofetch](https://archlinux.org/packages/?name=neofetch) 40 | - [eza](https://archlinux.org/packages/?name=eza) 41 | - [bat](https://github.com/sharkdp/bat) 42 | - [zsh](https://archlinux.org/packages/?name=zsh) 43 | - [zsh-syntax-highlighting](https://archlinux.org/packages/?name=zsh-syntax-highlighting) 44 | - [zsh-autosuggestions](https://archlinux.org/packages/?name=zsh-autosuggestions) 45 | - [zsh-theme-powerlevel10k](https://archlinux.org/packages/?name=zsh-theme-powerlevel10k) 46 | - [zoxide](https://archlinux.org/packages/community/x86_64/zoxide) 47 | 48 | ##### AUR 49 | 50 | - [ttf-meslo-nerd-font-powerlevel10k](https://aur.archlinux.org/packages/ttf-meslo-nerd-font-powerlevel10k/) 51 | 52 | ### Git repositories 53 | *(These are **NOT** needed for **arch** users - There are already arch packages for them)* 54 | - [powerlevel10k](https://github.com/romkatv/powerlevel10k) 55 | - [MesloLGS NF](https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k) *(Powerlevel10k recommended font)* 56 | ### Other Packages 57 | #### Cargo 58 | - [eza](https://github.com/eza-community/eza) *(Ubuntu 20.04 or earlier)* 59 | 60 | ### Installation script 61 | #### Ubuntu 62 | ##### Automatic 63 | [Script](deps-ubuntu.sh) 64 | ##### Manual 65 | ```shell 66 | # --- 67 | # Ubuntu 20.04 or earlier 68 | sudo apt install cargo 69 | cargo install eza 70 | 71 | # Ubuntu 20.10 or later 72 | sudo apt install eza 73 | # --- 74 | 75 | # --- 76 | # Ubuntu 20.10 or earlier 77 | sudo apt install autojump 78 | 79 | # Ubuntu 21.04 or later 80 | sudo apt install zoxide 81 | # --- 82 | 83 | sudo apt install neofetch bat zsh zsh-syntax-highlighting zsh-autosuggestions 84 | git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k 85 | ``` 86 | 87 | For the `MesloLGS NF` font, it's probably better to just follow the instructions from the [powerlevel10k README](https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k). 88 | #### Arch 89 | 90 | ##### Automatic 91 | [Script](deps-arch.sh) 92 | ##### Manual 93 | *(these commands use `paru` to install AUR packages)* 94 | ```shell 95 | sudo pacman -S zoxide neofetch eza bat zsh zsh-syntax-highlighting zsh-autosuggestions zsh-theme-powerlevel10k 96 | paru -S ttf-meslo-nerd-font-powerlevel10k 97 | ``` 98 | 99 | ### Change shell to ZSH (optional) 100 | ```shell 101 | chsh $USER -s /bin/zsh 102 | ``` 103 | 104 | ## How to clone this repo 105 | 106 | ### Packages needed 107 | This method requires `stow` for creating symlinks and `ed` for custom `.bashrc` support. 108 | 109 | > **Note**: The **automatic** scripts for installing dependencies also install these packages. 110 | #### Ubuntu 111 | ```shell 112 | sudo apt install stow ed 113 | ``` 114 | #### Arch 115 | ```shell 116 | sudo pacman -S --needed stow ed 117 | ``` 118 | 119 | ### Script 120 | #### Automatic 121 | [Script](setup.sh) 122 | #### Manual 123 | ```shell 124 | git clone https://github.com/algono/dotfiles ~/dotfiles 125 | 126 | if [ -f ~/.bashrc ]; then mv -f ~/.bashrc ~/dotfiles/bash 127 | elif [ -f /etc/skel/.bashrc ]; then cp -f /etc/skel/.bashrc ~/dotfiles/bash 128 | elif uname -r | grep -iq manjaro; then cp ~/dotfiles/.bash-presets/.bashrc-manjaro ~/dotfiles/bash/.bashrc 129 | else cp ~/dotfiles/.bash-presets/.bashrc-wsl ~/dotfiles/bash/.bashrc 130 | fi 131 | 132 | [ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc.bak 133 | 134 | ed ~/dotfiles/bash/.bashrc < ~/dotfiles/.patches/bashrc-patch.ed 135 | 136 | find ~/dotfiles/* -maxdepth 1 -name ".*" -o -type d -prune -printf "%f\n" | xargs /usr/bin/stow -d ~/dotfiles -t ~ 137 | ``` 138 | ### Explanation 139 | > Clone repo in dotfiles directory 140 | ```shell 141 | git clone https://github.com/algono/dotfiles ~/dotfiles 142 | ``` 143 | > If there is a custom *.bashrc* (either in the user's personal folder or in the system's *skel* folder), use it as a base. 144 | > As a fallback, if the system is detected as manjaro, use the default manjaro *.bashrc*, and if it wasn't use the default WSL one 145 | ```shell 146 | if [ -f ~/.bashrc ]; then mv -f ~/.bashrc ~/dotfiles/bash 147 | elif [ -f /etc/skel/.bashrc ]; then cp -f /etc/skel/.bashrc ~/dotfiles/bash 148 | elif uname -r | grep -iq manjaro; then cp ~/dotfiles/bash/.bashrc-manjaro ~/dotfiles/bash/.bashrc 149 | else cp ~/dotfiles/bash/.bashrc-wsl ~/dotfiles/bash/.bashrc 150 | fi 151 | ``` 152 | > If there is a *.zshrc* file in the home folder, rename it 153 | > (stow would fail if it finds a file there) 154 | ```shell 155 | [ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc.bak 156 | ``` 157 | > Use the *ed* command to apply the relevant changes to the custom *.bashrc* file (Note: You should backup `~/.bashrc` first if you have that file, as this method has not been extensively tested and it could break it) 158 | ```shell 159 | ed ~/dotfiles/bash/.bashrc < ~/dotfiles/.patches/bashrc.patch.ed 160 | ``` 161 | > Create symlinks for our dotfiles into the home directory 162 | > (this command matches all non-hidden directories inside the 'dotfiles' folder) 163 | ```shell 164 | find ~/dotfiles/* -maxdepth 1 -name ".*" -o -type d -prune -printf "%f\n" | xargs /usr/bin/stow -d ~/dotfiles -t ~ 165 | ``` 166 | 167 | ### The last command didn't work. It told me that some files were going to be overwritten and failed. 168 | If you already have some of the files from this repo, the last command will warn you and won't run. 169 | 170 | `Stow` does not have any option to overwrite files, so you can either **make backups** of these files *(example: `mv .dotfile .dotfile.bak`)*, or just **delete them**, and then re-run the last command. 171 | -------------------------------------------------------------------------------- /bash/.bash_aliases: -------------------------------------------------------------------------------- 1 | ../shell-shared/.shared_aliases -------------------------------------------------------------------------------- /deps-arch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Install pacman packages 4 | sudo pacman -Sy && \ 5 | sudo pacman -S --noconfirm --needed \ 6 | eza \ 7 | zoxide \ 8 | bat \ 9 | neofetch \ 10 | zsh \ 11 | zsh-syntax-highlighting zsh-autosuggestions \ 12 | zsh-theme-powerlevel10k \ 13 | stow ed 14 | 15 | # This helper function tries to use paru as AUR helper. 16 | # If paru is not available or the command fails, it tries to use yay as fallback. 17 | # And if yay is not available either, it skips the command. 18 | _aur_helper() { 19 | if type paru >/dev/null 2>&1; then paru "$@" && return; fi 20 | if type yay >/dev/null 2>&1; then yay "$@" 21 | else echo "No AUR helper was found. Skipping..." 22 | fi 23 | } 24 | 25 | # Install AUR packages 26 | _aur_helper -S --noconfirm --needed \ 27 | ttf-meslo-nerd-font-powerlevel10k 28 | -------------------------------------------------------------------------------- /deps-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Install apt packages (that don't depend on the version) 4 | sudo apt-get update && \ 5 | sudo apt-get -y install --no-install-recommends \ 6 | bat \ 7 | neofetch \ 8 | zsh zsh-syntax-highlighting zsh-autosuggestions \ 9 | stow ed 10 | 11 | # Install powerlevel10k (prompt for zsh) 12 | git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k 13 | 14 | # Installing version-dependent packages 15 | 16 | # Source variables related to Ubuntu version 17 | # ("$DISTRIB_RELEASE" gets the version) 18 | . /etc/lsb-release 19 | 20 | # Ubuntu 20.10 or later? 21 | if (dpkg --compare-versions "$DISTRIB_RELEASE" "ge" "20.10") 22 | then 23 | sudo apt-get -y install --no-install-recommends eza 24 | else 25 | sudo apt-get -y install --no-install-recommends cargo 26 | cargo install eza 27 | fi 28 | 29 | # Ubuntu 21.04 or later? 30 | if (dpkg --compare-versions "$DISTRIB_RELEASE" "ge" "21.04") 31 | then 32 | sudo apt-get -y install --no-install-recommends zoxide 33 | else 34 | sudo apt-get -y install --no-install-recommends autojump 35 | fi 36 | -------------------------------------------------------------------------------- /p10k/.p10k.zsh: -------------------------------------------------------------------------------- 1 | # Generated by Powerlevel10k configuration wizard on 2023-02-05 at 12:47 CET. 2 | # Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh. 3 | # Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode, 4 | # angled separators, sharp heads, sharp tails, 2 lines, disconnected, full frame, 5 | # darkest-ornaments, sparse, many icons, concise, instant_prompt=verbose. 6 | # Type `p10k configure` to generate another config. 7 | # 8 | # Config for Powerlevel10k with powerline prompt style with colorful background. 9 | # Type `p10k configure` to generate your own config based on it. 10 | # 11 | # Tip: Looking for a nice color? Here's a one-liner to print colormap. 12 | # 13 | # for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done 14 | 15 | # Temporarily change options. 16 | 'builtin' 'local' '-a' 'p10k_config_opts' 17 | [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') 18 | [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') 19 | [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') 20 | 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' 21 | 22 | () { 23 | emulate -L zsh -o extended_glob 24 | 25 | # Unset all configuration options. This allows you to apply configuration changes without 26 | # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. 27 | unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' 28 | 29 | # Zsh >= 5.1 is required. 30 | [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return 31 | 32 | # The list of segments shown on the left. Fill it with the most important segments. 33 | typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( 34 | # =========================[ Line #1 ]========================= 35 | os_icon # os identifier 36 | dir # current directory 37 | vcs # git status 38 | # =========================[ Line #2 ]========================= 39 | newline # \n 40 | # prompt_char # prompt symbol 41 | ) 42 | 43 | # The list of segments shown on the right. Fill it with less important segments. 44 | # Right prompt on the last prompt line (where you are typing your commands) gets 45 | # automatically hidden when the input line reaches it. Right prompt above the 46 | # last prompt line gets hidden if it would overlap with left prompt. 47 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( 48 | # =========================[ Line #1 ]========================= 49 | status # exit code of the last command 50 | command_execution_time # duration of the last command 51 | background_jobs # presence of background jobs 52 | direnv # direnv status (https://direnv.net/) 53 | asdf # asdf version manager (https://github.com/asdf-vm/asdf) 54 | virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) 55 | anaconda # conda environment (https://conda.io/) 56 | pyenv # python environment (https://github.com/pyenv/pyenv) 57 | goenv # go environment (https://github.com/syndbg/goenv) 58 | nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) 59 | nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) 60 | nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) 61 | # node_version # node.js version 62 | # go_version # go version (https://golang.org) 63 | # rust_version # rustc version (https://www.rust-lang.org) 64 | # dotnet_version # .NET version (https://dotnet.microsoft.com) 65 | # php_version # php version (https://www.php.net/) 66 | # laravel_version # laravel php framework version (https://laravel.com/) 67 | # java_version # java version (https://www.java.com/) 68 | # package # name@version from package.json (https://docs.npmjs.com/files/package.json) 69 | rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) 70 | rvm # ruby version from rvm (https://rvm.io) 71 | fvm # flutter version management (https://github.com/leoafarias/fvm) 72 | luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) 73 | jenv # java version from jenv (https://github.com/jenv/jenv) 74 | plenv # perl version from plenv (https://github.com/tokuhirom/plenv) 75 | perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew) 76 | phpenv # php version from phpenv (https://github.com/phpenv/phpenv) 77 | scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) 78 | haskell_stack # haskell version from stack (https://haskellstack.org/) 79 | kubecontext # current kubernetes context (https://kubernetes.io/) 80 | terraform # terraform workspace (https://www.terraform.io) 81 | # terraform_version # terraform version (https://www.terraform.io) 82 | aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) 83 | aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) 84 | azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) 85 | gcloud # google cloud cli account and project (https://cloud.google.com/) 86 | google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) 87 | toolbox # toolbox name (https://github.com/containers/toolbox) 88 | context # user@hostname 89 | nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) 90 | ranger # ranger shell (https://github.com/ranger/ranger) 91 | nnn # nnn shell (https://github.com/jarun/nnn) 92 | lf # lf shell (https://github.com/gokcehan/lf) 93 | xplr # xplr shell (https://github.com/sayanarijit/xplr) 94 | vim_shell # vim shell indicator (:sh) 95 | midnight_commander # midnight commander shell (https://midnight-commander.org/) 96 | nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 97 | vi_mode # vi mode (you don't need this if you've enabled prompt_char) 98 | # vpn_ip # virtual private network indicator 99 | # load # CPU load 100 | # disk_usage # disk usage 101 | # ram # free RAM 102 | # swap # used swap 103 | todo # todo items (https://github.com/todotxt/todo.txt-cli) 104 | timewarrior # timewarrior tracking status (https://timewarrior.net/) 105 | taskwarrior # taskwarrior task count (https://taskwarrior.org/) 106 | # cpu_arch # CPU architecture 107 | # time # current time 108 | # =========================[ Line #2 ]========================= 109 | newline 110 | # ip # ip address and bandwidth usage for a specified network interface 111 | # public_ip # public IP address 112 | # proxy # system-wide http/https/ftp proxy 113 | # battery # internal battery 114 | # wifi # wifi speed 115 | # example # example user-defined segment (see prompt_example function below) 116 | ) 117 | 118 | # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. 119 | typeset -g POWERLEVEL9K_MODE=nerdfont-complete 120 | # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid 121 | # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. 122 | typeset -g POWERLEVEL9K_ICON_PADDING=none 123 | 124 | # When set to true, icons appear before content on both sides of the prompt. When set 125 | # to false, icons go after content. If empty or not set, icons go before content in the left 126 | # prompt and after content in the right prompt. 127 | # 128 | # You can also override it for a specific segment: 129 | # 130 | # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false 131 | # 132 | # Or for a specific segment in specific state: 133 | # 134 | # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false 135 | typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= 136 | 137 | # Add an empty line before each prompt. 138 | typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true 139 | 140 | # Connect left prompt lines with these symbols. You'll probably want to use the same color 141 | # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. 142 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%238F╭─' 143 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%238F├─' 144 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%238F╰─' 145 | # Connect right prompt lines with these symbols. 146 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%238F─╮' 147 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%238F─┤' 148 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%238F─╯' 149 | 150 | # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or 151 | # '─'. The last two make it easier to see the alignment between left and right prompt and to 152 | # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false 153 | # for more compact prompt if using this option. 154 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' 155 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= 156 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= 157 | if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then 158 | # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE 159 | # ornaments defined above. 160 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=238 161 | # Start filler from the edge of the screen if there are no left segments on the first line. 162 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' 163 | # End filler on the edge of the screen if there are no right segments on the first line. 164 | typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' 165 | fi 166 | 167 | # Separator between same-color segments on the left. 168 | typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' 169 | # Separator between same-color segments on the right. 170 | typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' 171 | # Separator between different-color segments on the left. 172 | typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' 173 | # Separator between different-color segments on the right. 174 | typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' 175 | # The right end of left prompt. 176 | typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' 177 | # The left end of right prompt. 178 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' 179 | # The left end of left prompt. 180 | typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' 181 | # The right end of right prompt. 182 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' 183 | # Left prompt terminator for lines without any segments. 184 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= 185 | 186 | #################################[ os_icon: os identifier ]################################## 187 | # OS identifier color. 188 | typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 189 | typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 190 | # Custom icon. 191 | # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' 192 | 193 | ################################[ prompt_char: prompt symbol ]################################ 194 | # Transparent background. 195 | typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= 196 | # Green prompt symbol if the last command succeeded. 197 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 198 | # Red prompt symbol if the last command failed. 199 | typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 200 | # Default prompt symbol. 201 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' 202 | # Prompt symbol in command vi mode. 203 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' 204 | # Prompt symbol in visual vi mode. 205 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' 206 | # Prompt symbol in overwrite vi mode. 207 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' 208 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true 209 | # No line terminator if prompt_char is the last segment. 210 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= 211 | # No line introducer if prompt_char is the first segment. 212 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= 213 | # No surrounding whitespace. 214 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= 215 | 216 | ##################################[ dir: current directory ]################################## 217 | # Current directory background color. 218 | typeset -g POWERLEVEL9K_DIR_BACKGROUND=4 219 | # Default current directory foreground color. 220 | typeset -g POWERLEVEL9K_DIR_FOREGROUND=254 221 | # If directory is too long, shorten some of its segments to the shortest possible unique 222 | # prefix. The shortened directory can be tab-completed to the original. 223 | typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique 224 | # Replace removed segment suffixes with this symbol. 225 | typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= 226 | # Color of the shortened directory segments. 227 | typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 228 | # Color of the anchor directory segments. Anchor segments are never shortened. The first 229 | # segment is always an anchor. 230 | typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255 231 | # Display anchor directory segments in bold. 232 | typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true 233 | # Don't shorten directories that contain any of these files. They are anchors. 234 | local anchor_files=( 235 | .bzr 236 | .citc 237 | .git 238 | .hg 239 | .node-version 240 | .python-version 241 | .go-version 242 | .ruby-version 243 | .lua-version 244 | .java-version 245 | .perl-version 246 | .php-version 247 | .tool-version 248 | .shorten_folder_marker 249 | .svn 250 | .terraform 251 | CVS 252 | Cargo.toml 253 | composer.json 254 | go.mod 255 | package.json 256 | stack.yaml 257 | ) 258 | typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" 259 | # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains 260 | # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is 261 | # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) 262 | # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers 263 | # and other directories don't. 264 | # 265 | # Optionally, "first" and "last" can be followed by ":" where is an integer. 266 | # This moves the truncation point to the right (positive offset) or to the left (negative offset) 267 | # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" 268 | # respectively. 269 | typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false 270 | # Don't shorten this many last directory segments. They are anchors. 271 | typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 272 | # Shorten directory if it's longer than this even if there is space for it. The value can 273 | # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, 274 | # directory will be shortened only when prompt doesn't fit or when other parameters demand it 275 | # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). 276 | # If set to `0`, directory will always be shortened to its minimum length. 277 | typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 278 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this 279 | # many columns for typing commands. 280 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 281 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least 282 | # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. 283 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 284 | # If set to true, embed a hyperlink into the directory. Useful for quickly 285 | # opening a directory in the file manager simply by clicking the link. 286 | # Can also be handy when the directory is shortened, as it allows you to see 287 | # the full directory that was used in previous commands. 288 | typeset -g POWERLEVEL9K_DIR_HYPERLINK=false 289 | 290 | # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON 291 | # and POWERLEVEL9K_DIR_CLASSES below. 292 | typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 293 | 294 | # The default icon shown next to non-writable and non-existent directories when 295 | # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. 296 | # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' 297 | 298 | # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different 299 | # directories. It must be an array with 3 * N elements. Each triplet consists of: 300 | # 301 | # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with 302 | # extended_glob option enabled. 303 | # 2. Directory class for the purpose of styling. 304 | # 3. An empty string. 305 | # 306 | # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. 307 | # 308 | # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories 309 | # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. 310 | # 311 | # For example, given these settings: 312 | # 313 | # typeset -g POWERLEVEL9K_DIR_CLASSES=( 314 | # '~/work(|/*)' WORK '' 315 | # '~(|/*)' HOME '' 316 | # '*' DEFAULT '') 317 | # 318 | # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one 319 | # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or 320 | # WORK_NON_EXISTENT. 321 | # 322 | # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an 323 | # option to define custom colors and icons for different directory classes. 324 | # 325 | # # Styling for WORK. 326 | # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' 327 | # typeset -g POWERLEVEL9K_DIR_WORK_BACKGROUND=4 328 | # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=254 329 | # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=250 330 | # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=255 331 | # 332 | # # Styling for WORK_NOT_WRITABLE. 333 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 334 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_BACKGROUND=4 335 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=254 336 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=250 337 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=255 338 | # 339 | # # Styling for WORK_NON_EXISTENT. 340 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' 341 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_BACKGROUND=4 342 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=254 343 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=250 344 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=255 345 | # 346 | # If a styling parameter isn't explicitly defined for some class, it falls back to the classless 347 | # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls 348 | # back to POWERLEVEL9K_DIR_FOREGROUND. 349 | # 350 | # typeset -g POWERLEVEL9K_DIR_CLASSES=() 351 | 352 | # Custom prefix. 353 | # typeset -g POWERLEVEL9K_DIR_PREFIX='in ' 354 | 355 | #####################################[ vcs: git status ]###################################### 356 | # Version control background colors. 357 | typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2 358 | typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3 359 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2 360 | typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3 361 | typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8 362 | 363 | # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. 364 | typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' 365 | 366 | # Untracked files icon. It's really a question mark, your font isn't broken. 367 | # Change the value of this parameter to show a different icon. 368 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' 369 | 370 | # Formatter for Git status. 371 | # 372 | # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. 373 | # 374 | # You can edit the function to customize how Git status looks. 375 | # 376 | # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: 377 | # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. 378 | function my_git_formatter() { 379 | emulate -L zsh 380 | 381 | if [[ -n $P9K_CONTENT ]]; then 382 | # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from 383 | # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. 384 | typeset -g my_git_format=$P9K_CONTENT 385 | return 386 | fi 387 | 388 | # Styling for different parts of Git status. 389 | local meta='%7F' # white foreground 390 | local clean='%0F' # black foreground 391 | local modified='%0F' # black foreground 392 | local untracked='%0F' # black foreground 393 | local conflicted='%1F' # red foreground 394 | 395 | local res 396 | 397 | if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then 398 | local branch=${(V)VCS_STATUS_LOCAL_BRANCH} 399 | # If local branch name is at most 32 characters long, show it in full. 400 | # Otherwise show the first 12 … the last 12. 401 | # Tip: To always show local branch name in full without truncation, delete the next line. 402 | (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line 403 | res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" 404 | fi 405 | 406 | if [[ -n $VCS_STATUS_TAG 407 | # Show tag only if not on a branch. 408 | # Tip: To always show tag, delete the next line. 409 | && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line 410 | ]]; then 411 | local tag=${(V)VCS_STATUS_TAG} 412 | # If tag name is at most 32 characters long, show it in full. 413 | # Otherwise show the first 12 … the last 12. 414 | # Tip: To always show tag name in full without truncation, delete the next line. 415 | (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line 416 | res+="${meta}#${clean}${tag//\%/%%}" 417 | fi 418 | 419 | # Display the current Git commit if there is no branch and no tag. 420 | # Tip: To always display the current Git commit, delete the next line. 421 | [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line 422 | res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" 423 | 424 | # Show tracking branch name if it differs from local branch. 425 | if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then 426 | res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" 427 | fi 428 | 429 | # Display "wip" if the latest commit's summary contains "wip" or "WIP". 430 | if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then 431 | res+=" ${modified}wip" 432 | fi 433 | 434 | # ⇣42 if behind the remote. 435 | (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" 436 | # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. 437 | (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " 438 | (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" 439 | # ⇠42 if behind the push remote. 440 | (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" 441 | (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " 442 | # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. 443 | (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" 444 | # *42 if have stashes. 445 | (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" 446 | # 'merge' if the repo is in an unusual state. 447 | [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" 448 | # ~42 if have merge conflicts. 449 | (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" 450 | # +42 if have staged changes. 451 | (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" 452 | # !42 if have unstaged changes. 453 | (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" 454 | # ?42 if have untracked files. It's really a question mark, your font isn't broken. 455 | # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. 456 | # Remove the next line if you don't want to see untracked files at all. 457 | (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" 458 | # "─" if the number of unstaged files is unknown. This can happen due to 459 | # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower 460 | # than the number of files in the Git index, or due to bash.showDirtyState being set to false 461 | # in the repository config. The number of staged and untracked files may also be unknown 462 | # in this case. 463 | (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" 464 | 465 | typeset -g my_git_format=$res 466 | } 467 | functions -M my_git_formatter 2>/dev/null 468 | 469 | # Don't count the number of unstaged, untracked and conflicted files in Git repositories with 470 | # more than this many files in the index. Negative value means infinity. 471 | # 472 | # If you are working in Git repositories with tens of millions of files and seeing performance 473 | # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output 474 | # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's 475 | # config: `git config bash.showDirtyState false`. 476 | typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 477 | 478 | # Don't show Git status in prompt for repositories whose workdir matches this pattern. 479 | # For example, if set to '~', the Git repository at $HOME/.git will be ignored. 480 | # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. 481 | typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' 482 | 483 | # Disable the default Git status formatting. 484 | typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true 485 | # Install our own Git status formatter. 486 | typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' 487 | # Enable counters for staged, unstaged, etc. 488 | typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 489 | 490 | # Custom icon. 491 | # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' 492 | # Custom prefix. 493 | # typeset -g POWERLEVEL9K_VCS_PREFIX='on ' 494 | 495 | # Show status of repositories of these types. You can add svn and/or hg if you are 496 | # using them. If you do, your prompt may become slow even when your current directory 497 | # isn't in an svn or hg repository. 498 | typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) 499 | 500 | ##########################[ status: exit code of the last command ]########################### 501 | # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and 502 | # style them independently from the regular OK and ERROR state. 503 | typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true 504 | 505 | # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as 506 | # it will signify success by turning green. 507 | typeset -g POWERLEVEL9K_STATUS_OK=true 508 | typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' 509 | typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2 510 | typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 511 | 512 | # Status when some part of a pipe command fails but the overall exit status is zero. It may look 513 | # like this: 1|0. 514 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true 515 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' 516 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2 517 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 518 | 519 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as 520 | # it will signify error by turning red. 521 | typeset -g POWERLEVEL9K_STATUS_ERROR=true 522 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' 523 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3 524 | typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1 525 | 526 | # Status when the last command was terminated by a signal. 527 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true 528 | # Use terse signal names: "INT" instead of "SIGINT(2)". 529 | typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false 530 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' 531 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3 532 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1 533 | 534 | # Status when some part of a pipe command fails and the overall exit status is also non-zero. 535 | # It may look like this: 1|0. 536 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true 537 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' 538 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3 539 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1 540 | 541 | ###################[ command_execution_time: duration of the last command ]################### 542 | # Execution time color. 543 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0 544 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3 545 | # Show duration of the last command if takes at least this many seconds. 546 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 547 | # Show this many fractional digits. Zero means round to seconds. 548 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 549 | # Duration format: 1d 2h 3m 4s. 550 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' 551 | # Custom icon. 552 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' 553 | # Custom prefix. 554 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' 555 | 556 | #######################[ background_jobs: presence of background jobs ]####################### 557 | # Background jobs color. 558 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6 559 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0 560 | # Don't show the number of background jobs. 561 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false 562 | # Custom icon. 563 | # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' 564 | 565 | #######################[ direnv: direnv status (https://direnv.net/) ]######################## 566 | # Direnv color. 567 | typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3 568 | typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0 569 | # Custom icon. 570 | # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 571 | 572 | ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### 573 | # Default asdf color. Only used to display tools for which there is no color override (see below). 574 | # Tip: Override these parameters for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND and 575 | # POWERLEVEL9K_ASDF_${TOOL}_BACKGROUND. 576 | typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0 577 | typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7 578 | 579 | # There are four parameters that can be used to hide asdf tools. Each parameter describes 580 | # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at 581 | # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to 582 | # hide a tool, it gets shown. 583 | # 584 | # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and 585 | # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: 586 | # 587 | # asdf local python 3.8.1 588 | # asdf global python 3.8.1 589 | # 590 | # After running both commands the current python version is 3.8.1 and its source is "local" as 591 | # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, 592 | # it'll hide python version in this case because 3.8.1 is the same as the global version. 593 | # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't 594 | # contain "local". 595 | 596 | # Hide tool versions that don't come from one of these sources. 597 | # 598 | # Available sources: 599 | # 600 | # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" 601 | # - local `asdf current` says "set by /some/not/home/directory/file" 602 | # - global `asdf current` says "set by /home/username/file" 603 | # 604 | # Note: If this parameter is set to (shell local global), it won't hide tools. 605 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. 606 | typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) 607 | 608 | # If set to false, hide tool versions that are the same as global. 609 | # 610 | # Note: The name of this parameter doesn't reflect its meaning at all. 611 | # Note: If this parameter is set to true, it won't hide tools. 612 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. 613 | typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false 614 | 615 | # If set to false, hide tool versions that are equal to "system". 616 | # 617 | # Note: If this parameter is set to true, it won't hide tools. 618 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. 619 | typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true 620 | 621 | # If set to non-empty value, hide tools unless there is a file matching the specified file pattern 622 | # in the current directory, or its parent directory, or its grandparent directory, and so on. 623 | # 624 | # Note: If this parameter is set to empty value, it won't hide tools. 625 | # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. 626 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. 627 | # 628 | # Example: Hide nodejs version when there is no package.json and no *.js files in the current 629 | # directory, in `..`, in `../..` and so on. 630 | # 631 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' 632 | typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= 633 | 634 | # Ruby version from asdf. 635 | typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0 636 | typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1 637 | # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' 638 | # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' 639 | 640 | # Python version from asdf. 641 | typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0 642 | typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4 643 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' 644 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' 645 | 646 | # Go version from asdf. 647 | typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0 648 | typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4 649 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 650 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 651 | 652 | # Node.js version from asdf. 653 | typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0 654 | typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2 655 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' 656 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' 657 | 658 | # Rust version from asdf. 659 | typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0 660 | typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208 661 | # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' 662 | # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' 663 | 664 | # .NET Core version from asdf. 665 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0 666 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5 667 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' 668 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' 669 | 670 | # Flutter version from asdf. 671 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0 672 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4 673 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' 674 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' 675 | 676 | # Lua version from asdf. 677 | typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0 678 | typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4 679 | # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' 680 | # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' 681 | 682 | # Java version from asdf. 683 | typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1 684 | typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7 685 | # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' 686 | # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' 687 | 688 | # Perl version from asdf. 689 | typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0 690 | typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4 691 | # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' 692 | # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' 693 | 694 | # Erlang version from asdf. 695 | typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0 696 | typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1 697 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 698 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 699 | 700 | # Elixir version from asdf. 701 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0 702 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5 703 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' 704 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' 705 | 706 | # Postgres version from asdf. 707 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0 708 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6 709 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' 710 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' 711 | 712 | # PHP version from asdf. 713 | typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0 714 | typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5 715 | # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' 716 | # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' 717 | 718 | # Haskell version from asdf. 719 | typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0 720 | typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3 721 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 722 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' 723 | 724 | # Julia version from asdf. 725 | typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0 726 | typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2 727 | # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' 728 | # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' 729 | 730 | ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### 731 | # NordVPN connection indicator color. 732 | typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7 733 | typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4 734 | # Hide NordVPN connection indicator when not connected. 735 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= 736 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= 737 | # Custom icon. 738 | # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' 739 | 740 | #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## 741 | # Ranger shell color. 742 | typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3 743 | typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 744 | # Custom icon. 745 | # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' 746 | 747 | ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### 748 | # Nnn shell color. 749 | typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 750 | typeset -g POWERLEVEL9K_NNN_BACKGROUND=6 751 | # Custom icon. 752 | # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' 753 | 754 | ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]####################### 755 | # lf shell color. 756 | typeset -g POWERLEVEL9K_LF_FOREGROUND=0 757 | typeset -g POWERLEVEL9K_LF_BACKGROUND=6 758 | # Custom icon. 759 | # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐' 760 | 761 | ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## 762 | # xplr shell color. 763 | typeset -g POWERLEVEL9K_XPLR_FOREGROUND=0 764 | typeset -g POWERLEVEL9K_XPLR_BACKGROUND=6 765 | # Custom icon. 766 | # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' 767 | 768 | ###########################[ vim_shell: vim shell indicator (:sh) ]########################### 769 | # Vim shell indicator color. 770 | typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 771 | typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2 772 | # Custom icon. 773 | # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 774 | 775 | ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### 776 | # Midnight Commander shell color. 777 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3 778 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0 779 | # Custom icon. 780 | # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' 781 | 782 | #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## 783 | # Nix shell color. 784 | typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 785 | typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 786 | 787 | # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. 788 | # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= 789 | 790 | # Custom icon. 791 | # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 792 | 793 | ##################################[ disk_usage: disk usage ]################################## 794 | # Colors for different levels of disk usage. 795 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 796 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0 797 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0 798 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3 799 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7 800 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1 801 | # Thresholds for different levels of disk usage (percentage points). 802 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 803 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 804 | # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. 805 | typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false 806 | # Custom icon. 807 | # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 808 | 809 | ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### 810 | # Foreground color. 811 | typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 812 | # Text and color for normal (a.k.a. command) vi mode. 813 | typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL 814 | typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 815 | # Text and color for visual vi mode. 816 | typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL 817 | typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 818 | # Text and color for overtype (a.k.a. overwrite and replace) vi mode. 819 | typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE 820 | typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 821 | # Text and color for insert vi mode. 822 | typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= 823 | typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 824 | 825 | ######################################[ ram: free RAM ]####################################### 826 | # RAM color. 827 | typeset -g POWERLEVEL9K_RAM_FOREGROUND=0 828 | typeset -g POWERLEVEL9K_RAM_BACKGROUND=3 829 | # Custom icon. 830 | # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' 831 | 832 | #####################################[ swap: used swap ]###################################### 833 | # Swap color. 834 | typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0 835 | typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3 836 | # Custom icon. 837 | # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' 838 | 839 | ######################################[ load: CPU load ]###################################### 840 | # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. 841 | typeset -g POWERLEVEL9K_LOAD_WHICH=5 842 | # Load color when load is under 50%. 843 | typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0 844 | typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2 845 | # Load color when load is between 50% and 70%. 846 | typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0 847 | typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3 848 | # Load color when load is over 70%. 849 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0 850 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1 851 | # Custom icon. 852 | # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' 853 | 854 | ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ 855 | # Todo color. 856 | typeset -g POWERLEVEL9K_TODO_FOREGROUND=0 857 | typeset -g POWERLEVEL9K_TODO_BACKGROUND=8 858 | # Hide todo when the total number of tasks is zero. 859 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true 860 | # Hide todo when the number of tasks after filtering is zero. 861 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false 862 | 863 | # Todo format. The following parameters are available within the expansion. 864 | # 865 | # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. 866 | # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. 867 | # 868 | # These variables correspond to the last line of the output of `todo.sh -p ls`: 869 | # 870 | # TODO: 24 of 42 tasks shown 871 | # 872 | # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. 873 | # 874 | # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' 875 | 876 | # Custom icon. 877 | # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' 878 | 879 | ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ 880 | # Timewarrior color. 881 | typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255 882 | typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8 883 | 884 | # If the tracked task is longer than 24 characters, truncate and append "…". 885 | # Tip: To always display tasks without truncation, delete the following parameter. 886 | # Tip: To hide task names and display just the icon when time tracking is enabled, set the 887 | # value of the following parameter to "". 888 | typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' 889 | 890 | # Custom icon. 891 | # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 892 | 893 | ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## 894 | # Taskwarrior color. 895 | typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0 896 | typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6 897 | 898 | # Taskwarrior segment format. The following parameters are available within the expansion. 899 | # 900 | # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. 901 | # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. 902 | # 903 | # Zero values are represented as empty parameters. 904 | # 905 | # The default format: 906 | # 907 | # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' 908 | # 909 | # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' 910 | 911 | # Custom icon. 912 | # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 913 | 914 | ################################[ cpu_arch: CPU architecture ]################################ 915 | # CPU architecture color. 916 | typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0 917 | typeset -g POWERLEVEL9K_CPU_ARCH_BACKGROUND=3 918 | 919 | # Hide the segment when on a specific CPU architecture. 920 | # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION= 921 | # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION= 922 | 923 | # Custom icon. 924 | # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐' 925 | 926 | ##################################[ context: user@hostname ]################################## 927 | # Context color when running with privileges. 928 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1 929 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0 930 | # Context color in SSH without privileges. 931 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3 932 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0 933 | # Default context color (no privileges, no SSH). 934 | typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3 935 | typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0 936 | 937 | # Context format when running with privileges: user@hostname. 938 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' 939 | # Context format when in SSH without privileges: user@hostname. 940 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' 941 | # Default context format (no privileges, no SSH): user@hostname. 942 | typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' 943 | 944 | # Don't show context unless running with privileges or in SSH. 945 | # Tip: Remove the next line to always show context. 946 | typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= 947 | 948 | # Custom icon. 949 | # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' 950 | # Custom prefix. 951 | # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' 952 | 953 | ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### 954 | # Python virtual environment color. 955 | typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0 956 | typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4 957 | # Don't show Python version next to the virtual environment name. 958 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false 959 | # If set to "false", won't show virtualenv if pyenv is already shown. 960 | # If set to "if-different", won't show virtualenv if it's the same as pyenv. 961 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false 962 | # Separate environment name from Python version only with a space. 963 | typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= 964 | # Custom icon. 965 | # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 966 | 967 | #####################[ anaconda: conda environment (https://conda.io/) ]###################### 968 | # Anaconda environment color. 969 | typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0 970 | typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4 971 | 972 | # Anaconda segment format. The following parameters are available within the expansion. 973 | # 974 | # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. 975 | # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. 976 | # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). 977 | # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). 978 | # 979 | # CONDA_PROMPT_MODIFIER can be configured with the following command: 980 | # 981 | # conda config --set env_prompt '({default_env}) ' 982 | # 983 | # The last argument is a Python format string that can use the following variables: 984 | # 985 | # - prefix The same as CONDA_PREFIX. 986 | # - default_env The same as CONDA_DEFAULT_ENV. 987 | # - name The last segment of CONDA_PREFIX. 988 | # - stacked_env Comma-separated list of names in the environment stack. The first element is 989 | # always the same as default_env. 990 | # 991 | # Note: '({default_env}) ' is the default value of env_prompt. 992 | # 993 | # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER 994 | # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former 995 | # is empty. 996 | typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' 997 | 998 | # Custom icon. 999 | # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' 1000 | 1001 | ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ 1002 | # Pyenv color. 1003 | typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0 1004 | typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4 1005 | # Hide python version if it doesn't come from one of these sources. 1006 | typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) 1007 | # If set to false, hide python version if it's the same as global: 1008 | # $(pyenv version-name) == $(pyenv global). 1009 | typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false 1010 | # If set to false, hide python version if it's equal to "system". 1011 | typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true 1012 | 1013 | # Pyenv segment format. The following parameters are available within the expansion. 1014 | # 1015 | # - P9K_CONTENT Current pyenv environment (pyenv version-name). 1016 | # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). 1017 | # 1018 | # The default format has the following logic: 1019 | # 1020 | # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or 1021 | # starts with "$P9K_PYENV_PYTHON_VERSION/". 1022 | # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". 1023 | typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' 1024 | 1025 | # Custom icon. 1026 | # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1027 | 1028 | ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ 1029 | # Goenv color. 1030 | typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0 1031 | typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4 1032 | # Hide go version if it doesn't come from one of these sources. 1033 | typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) 1034 | # If set to false, hide go version if it's the same as global: 1035 | # $(goenv version-name) == $(goenv global). 1036 | typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false 1037 | # If set to false, hide go version if it's equal to "system". 1038 | typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true 1039 | # Custom icon. 1040 | # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1041 | 1042 | ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## 1043 | # Nodenv color. 1044 | typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2 1045 | typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0 1046 | # Hide node version if it doesn't come from one of these sources. 1047 | typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) 1048 | # If set to false, hide node version if it's the same as global: 1049 | # $(nodenv version-name) == $(nodenv global). 1050 | typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false 1051 | # If set to false, hide node version if it's equal to "system". 1052 | typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true 1053 | # Custom icon. 1054 | # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1055 | 1056 | ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### 1057 | # Nvm color. 1058 | typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 1059 | typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 1060 | # Custom icon. 1061 | # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1062 | 1063 | ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ 1064 | # Nodeenv color. 1065 | typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2 1066 | typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0 1067 | # Don't show Node version next to the environment name. 1068 | typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false 1069 | # Separate environment name from Node version only with a space. 1070 | typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= 1071 | # Custom icon. 1072 | # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1073 | 1074 | ##############################[ node_version: node.js version ]############################### 1075 | # Node version color. 1076 | typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7 1077 | typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2 1078 | # Show node version only when in a directory tree containing package.json. 1079 | typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true 1080 | # Custom icon. 1081 | # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1082 | 1083 | #######################[ go_version: go version (https://golang.org) ]######################## 1084 | # Go version color. 1085 | typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255 1086 | typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2 1087 | # Show go version only when in a go project subdirectory. 1088 | typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true 1089 | # Custom icon. 1090 | # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1091 | 1092 | #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## 1093 | # Rust version color. 1094 | typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0 1095 | typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208 1096 | # Show rust version only when in a rust project subdirectory. 1097 | typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true 1098 | # Custom icon. 1099 | # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1100 | 1101 | ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ 1102 | # .NET version color. 1103 | typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7 1104 | typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5 1105 | # Show .NET version only when in a .NET project subdirectory. 1106 | typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true 1107 | # Custom icon. 1108 | # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1109 | 1110 | #####################[ php_version: php version (https://www.php.net/) ]###################### 1111 | # PHP version color. 1112 | typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0 1113 | typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5 1114 | # Show PHP version only when in a PHP project subdirectory. 1115 | typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true 1116 | # Custom icon. 1117 | # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1118 | 1119 | ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### 1120 | # Laravel version color. 1121 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1 1122 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7 1123 | # Custom icon. 1124 | # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1125 | 1126 | #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## 1127 | # Rbenv color. 1128 | typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0 1129 | typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1 1130 | # Hide ruby version if it doesn't come from one of these sources. 1131 | typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) 1132 | # If set to false, hide ruby version if it's the same as global: 1133 | # $(rbenv version-name) == $(rbenv global). 1134 | typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false 1135 | # If set to false, hide ruby version if it's equal to "system". 1136 | typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true 1137 | # Custom icon. 1138 | # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1139 | 1140 | ####################[ java_version: java version (https://www.java.com/) ]#################### 1141 | # Java version color. 1142 | typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1 1143 | typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7 1144 | # Show java version only when in a java project subdirectory. 1145 | typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true 1146 | # Show brief version. 1147 | typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false 1148 | # Custom icon. 1149 | # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1150 | 1151 | ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### 1152 | # Package color. 1153 | typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0 1154 | typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6 1155 | 1156 | # Package format. The following parameters are available within the expansion. 1157 | # 1158 | # - P9K_PACKAGE_NAME The value of `name` field in package.json. 1159 | # - P9K_PACKAGE_VERSION The value of `version` field in package.json. 1160 | # 1161 | # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' 1162 | 1163 | # Custom icon. 1164 | # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1165 | 1166 | #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## 1167 | # Rvm color. 1168 | typeset -g POWERLEVEL9K_RVM_FOREGROUND=0 1169 | typeset -g POWERLEVEL9K_RVM_BACKGROUND=240 1170 | # Don't show @gemset at the end. 1171 | typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false 1172 | # Don't show ruby- at the front. 1173 | typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false 1174 | # Custom icon. 1175 | # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1176 | 1177 | ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ 1178 | # Fvm color. 1179 | typeset -g POWERLEVEL9K_FVM_FOREGROUND=0 1180 | typeset -g POWERLEVEL9K_FVM_BACKGROUND=4 1181 | # Custom icon. 1182 | # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1183 | 1184 | ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### 1185 | # Lua color. 1186 | typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0 1187 | typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4 1188 | # Hide lua version if it doesn't come from one of these sources. 1189 | typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) 1190 | # If set to false, hide lua version if it's the same as global: 1191 | # $(luaenv version-name) == $(luaenv global). 1192 | typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false 1193 | # If set to false, hide lua version if it's equal to "system". 1194 | typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true 1195 | # Custom icon. 1196 | # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1197 | 1198 | ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ 1199 | # Java color. 1200 | typeset -g POWERLEVEL9K_JENV_FOREGROUND=1 1201 | typeset -g POWERLEVEL9K_JENV_BACKGROUND=7 1202 | # Hide java version if it doesn't come from one of these sources. 1203 | typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) 1204 | # If set to false, hide java version if it's the same as global: 1205 | # $(jenv version-name) == $(jenv global). 1206 | typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false 1207 | # If set to false, hide java version if it's equal to "system". 1208 | typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true 1209 | # Custom icon. 1210 | # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1211 | 1212 | ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ 1213 | # Perl color. 1214 | typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0 1215 | typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4 1216 | # Hide perl version if it doesn't come from one of these sources. 1217 | typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) 1218 | # If set to false, hide perl version if it's the same as global: 1219 | # $(plenv version-name) == $(plenv global). 1220 | typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false 1221 | # If set to false, hide perl version if it's equal to "system". 1222 | typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true 1223 | # Custom icon. 1224 | # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1225 | 1226 | ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############ 1227 | # Perlbrew color. 1228 | typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67 1229 | # Show perlbrew version only when in a perl project subdirectory. 1230 | typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true 1231 | # Don't show "perl-" at the front. 1232 | typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false 1233 | # Custom icon. 1234 | # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐' 1235 | 1236 | ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ 1237 | # PHP color. 1238 | typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0 1239 | typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5 1240 | # Hide php version if it doesn't come from one of these sources. 1241 | typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) 1242 | # If set to false, hide php version if it's the same as global: 1243 | # $(phpenv version-name) == $(phpenv global). 1244 | typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false 1245 | # If set to false, hide PHP version if it's equal to "system". 1246 | typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true 1247 | # Custom icon. 1248 | # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1249 | 1250 | #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### 1251 | # Scala color. 1252 | typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0 1253 | typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1 1254 | # Hide scala version if it doesn't come from one of these sources. 1255 | typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) 1256 | # If set to false, hide scala version if it's the same as global: 1257 | # $(scalaenv version-name) == $(scalaenv global). 1258 | typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false 1259 | # If set to false, hide scala version if it's equal to "system". 1260 | typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true 1261 | # Custom icon. 1262 | # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1263 | 1264 | ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### 1265 | # Haskell color. 1266 | typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0 1267 | typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3 1268 | 1269 | # Hide haskell version if it doesn't come from one of these sources. 1270 | # 1271 | # shell: version is set by STACK_YAML 1272 | # local: version is set by stack.yaml up the directory tree 1273 | # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) 1274 | typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) 1275 | # If set to false, hide haskell version if it's the same as in the implicit global project. 1276 | typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true 1277 | # Custom icon. 1278 | # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' 1279 | 1280 | ################[ terraform: terraform workspace (https://www.terraform.io) ]################# 1281 | # Don't show terraform workspace if it's literally "default". 1282 | typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false 1283 | # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element 1284 | # in each pair defines a pattern against which the current terraform workspace gets matched. 1285 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1286 | # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, 1287 | # you'll see this value in your prompt. The second element of each pair in 1288 | # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The 1289 | # first match wins. 1290 | # 1291 | # For example, given these settings: 1292 | # 1293 | # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1294 | # '*prod*' PROD 1295 | # '*test*' TEST 1296 | # '*' OTHER) 1297 | # 1298 | # If your current terraform workspace is "project_test", its class is TEST because "project_test" 1299 | # doesn't match the pattern '*prod*' but does match '*test*'. 1300 | # 1301 | # You can define different colors, icons and content expansions for different classes: 1302 | # 1303 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=2 1304 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_BACKGROUND=0 1305 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1306 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1307 | typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1308 | # '*prod*' PROD # These values are examples that are unlikely 1309 | # '*test*' TEST # to match your needs. Customize them as needed. 1310 | '*' OTHER) 1311 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4 1312 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0 1313 | # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' 1314 | 1315 | #############[ terraform_version: terraform version (https://www.terraform.io) ]############## 1316 | # Terraform version color. 1317 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=4 1318 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_BACKGROUND=0 1319 | # Custom icon. 1320 | # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1321 | 1322 | ################[ terraform_version: It shows active terraform version (https://www.terraform.io) ]################# 1323 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf' 1324 | 1325 | #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# 1326 | # Show kubecontext only when the command you are typing invokes one of these tools. 1327 | # Tip: Remove the next line to always show kubecontext. 1328 | typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent' 1329 | 1330 | # Kubernetes context classes for the purpose of using different colors, icons and expansions with 1331 | # different contexts. 1332 | # 1333 | # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element 1334 | # in each pair defines a pattern against which the current kubernetes context gets matched. 1335 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1336 | # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, 1337 | # you'll see this value in your prompt. The second element of each pair in 1338 | # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The 1339 | # first match wins. 1340 | # 1341 | # For example, given these settings: 1342 | # 1343 | # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1344 | # '*prod*' PROD 1345 | # '*test*' TEST 1346 | # '*' DEFAULT) 1347 | # 1348 | # If your current kubernetes context is "deathray-testing/default", its class is TEST 1349 | # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. 1350 | # 1351 | # You can define different colors, icons and content expansions for different classes: 1352 | # 1353 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=0 1354 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_BACKGROUND=2 1355 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1356 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1357 | typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1358 | # '*prod*' PROD # These values are examples that are unlikely 1359 | # '*test*' TEST # to match your needs. Customize them as needed. 1360 | '*' DEFAULT) 1361 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 1362 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 1363 | # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1364 | 1365 | # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext 1366 | # segment. Parameter expansions are very flexible and fast, too. See reference: 1367 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1368 | # 1369 | # Within the expansion the following parameters are always available: 1370 | # 1371 | # - P9K_CONTENT The content that would've been displayed if there was no content 1372 | # expansion defined. 1373 | # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the 1374 | # output of `kubectl config get-contexts`. 1375 | # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the 1376 | # output of `kubectl config get-contexts`. 1377 | # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE 1378 | # in the output of `kubectl config get-contexts`. If there is no 1379 | # namespace, the parameter is set to "default". 1380 | # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the 1381 | # output of `kubectl config get-contexts`. 1382 | # 1383 | # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), 1384 | # the following extra parameters are available: 1385 | # 1386 | # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". 1387 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. 1388 | # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. 1389 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. 1390 | # 1391 | # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, 1392 | # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": 1393 | # 1394 | # - P9K_KUBECONTEXT_CLOUD_NAME=gke 1395 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account 1396 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a 1397 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1398 | # 1399 | # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": 1400 | # 1401 | # - P9K_KUBECONTEXT_CLOUD_NAME=eks 1402 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 1403 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 1404 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1405 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= 1406 | # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. 1407 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' 1408 | # Append the current context's namespace if it's not "default". 1409 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' 1410 | 1411 | # Custom prefix. 1412 | # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' 1413 | 1414 | #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# 1415 | # Show aws only when the command you are typing invokes one of these tools. 1416 | # Tip: Remove the next line to always show aws. 1417 | typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' 1418 | 1419 | # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element 1420 | # in each pair defines a pattern against which the current AWS profile gets matched. 1421 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1422 | # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, 1423 | # you'll see this value in your prompt. The second element of each pair in 1424 | # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The 1425 | # first match wins. 1426 | # 1427 | # For example, given these settings: 1428 | # 1429 | # typeset -g POWERLEVEL9K_AWS_CLASSES=( 1430 | # '*prod*' PROD 1431 | # '*test*' TEST 1432 | # '*' DEFAULT) 1433 | # 1434 | # If your current AWS profile is "company_test", its class is TEST 1435 | # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. 1436 | # 1437 | # You can define different colors, icons and content expansions for different classes: 1438 | # 1439 | # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 1440 | # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1441 | # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1442 | typeset -g POWERLEVEL9K_AWS_CLASSES=( 1443 | # '*prod*' PROD # These values are examples that are unlikely 1444 | # '*test*' TEST # to match your needs. Customize them as needed. 1445 | '*' DEFAULT) 1446 | typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7 1447 | typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1 1448 | # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1449 | 1450 | # AWS segment format. The following parameters are available within the expansion. 1451 | # 1452 | # - P9K_AWS_PROFILE The name of the current AWS profile. 1453 | # - P9K_AWS_REGION The region associated with the current AWS profile. 1454 | typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' 1455 | 1456 | #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# 1457 | # AWS Elastic Beanstalk environment color. 1458 | typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2 1459 | typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0 1460 | # Custom icon. 1461 | # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1462 | 1463 | ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## 1464 | # Show azure only when the command you are typing invokes one of these tools. 1465 | # Tip: Remove the next line to always show azure. 1466 | typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 1467 | # Azure account name color. 1468 | typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7 1469 | typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4 1470 | # Custom icon. 1471 | # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1472 | 1473 | ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### 1474 | # Show gcloud only when the command you are typing invokes one of these tools. 1475 | # Tip: Remove the next line to always show gcloud. 1476 | typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil' 1477 | # Google cloud color. 1478 | typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7 1479 | typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4 1480 | 1481 | # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or 1482 | # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative 1483 | # enough. You can use the following parameters in the expansions. Each of them corresponds to the 1484 | # output of `gcloud` tool. 1485 | # 1486 | # Parameter | Source 1487 | # -------------------------|-------------------------------------------------------------------- 1488 | # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' 1489 | # P9K_GCLOUD_ACCOUNT | gcloud config get-value account 1490 | # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project 1491 | # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' 1492 | # 1493 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. 1494 | # 1495 | # Obtaining project name requires sending a request to Google servers. This can take a long time 1496 | # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud 1497 | # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets 1498 | # set and gcloud prompt segment transitions to state COMPLETE. 1499 | # 1500 | # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL 1501 | # and COMPLETE. You can also hide gcloud in state PARTIAL by setting 1502 | # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and 1503 | # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. 1504 | typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' 1505 | typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' 1506 | 1507 | # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name 1508 | # this often. Negative value disables periodic polling. In this mode project name is retrieved 1509 | # only when the current configuration, account or project id changes. 1510 | typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 1511 | 1512 | # Custom icon. 1513 | # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' 1514 | 1515 | #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# 1516 | # Show google_app_cred only when the command you are typing invokes one of these tools. 1517 | # Tip: Remove the next line to always show google_app_cred. 1518 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' 1519 | 1520 | # Google application credentials classes for the purpose of using different colors, icons and 1521 | # expansions with different credentials. 1522 | # 1523 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first 1524 | # element in each pair defines a pattern against which the current kubernetes context gets 1525 | # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion 1526 | # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION 1527 | # parameters, you'll see this value in your prompt. The second element of each pair in 1528 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. 1529 | # The first match wins. 1530 | # 1531 | # For example, given these settings: 1532 | # 1533 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1534 | # '*:*prod*:*' PROD 1535 | # '*:*test*:*' TEST 1536 | # '*' DEFAULT) 1537 | # 1538 | # If your current Google application credentials is "service_account deathray-testing x@y.com", 1539 | # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. 1540 | # 1541 | # You can define different colors, icons and content expansions for different classes: 1542 | # 1543 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 1544 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1545 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' 1546 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1547 | # '*:*prod*:*' PROD # These values are examples that are unlikely 1548 | # '*:*test*:*' TEST # to match your needs. Customize them as needed. 1549 | '*' DEFAULT) 1550 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7 1551 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4 1552 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1553 | 1554 | # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by 1555 | # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: 1556 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1557 | # 1558 | # You can use the following parameters in the expansion. Each of them corresponds to one of the 1559 | # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. 1560 | # 1561 | # Parameter | JSON key file field 1562 | # ---------------------------------+--------------- 1563 | # P9K_GOOGLE_APP_CRED_TYPE | type 1564 | # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id 1565 | # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email 1566 | # 1567 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. 1568 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' 1569 | 1570 | ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]############### 1571 | # Toolbox color. 1572 | typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=0 1573 | typeset -g POWERLEVEL9K_TOOLBOX_BACKGROUND=3 1574 | # Don't display the name of the toolbox if it matches fedora-toolbox-*. 1575 | typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}' 1576 | # Custom icon. 1577 | # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' 1578 | # Custom prefix. 1579 | # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='in ' 1580 | 1581 | ###############################[ public_ip: public IP address ]############################### 1582 | # Public IP color. 1583 | typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7 1584 | typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0 1585 | # Custom icon. 1586 | # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1587 | 1588 | ########################[ vpn_ip: virtual private network indicator ]######################### 1589 | # VPN IP color. 1590 | typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0 1591 | typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6 1592 | # When on VPN, show just an icon without the IP address. 1593 | # Tip: To display the private IP address when on VPN, remove the next line. 1594 | typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= 1595 | # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN 1596 | # to see the name of the interface. 1597 | typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)' 1598 | # If set to true, show one segment per matching network interface. If set to false, show only 1599 | # one segment corresponding to the first matching network interface. 1600 | # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. 1601 | typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false 1602 | # Custom icon. 1603 | # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1604 | 1605 | ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### 1606 | # IP color. 1607 | typeset -g POWERLEVEL9K_IP_BACKGROUND=4 1608 | typeset -g POWERLEVEL9K_IP_FOREGROUND=0 1609 | # The following parameters are accessible within the expansion: 1610 | # 1611 | # Parameter | Meaning 1612 | # ----------------------+------------------------------------------- 1613 | # P9K_IP_IP | IP address 1614 | # P9K_IP_INTERFACE | network interface 1615 | # P9K_IP_RX_BYTES | total number of bytes received 1616 | # P9K_IP_TX_BYTES | total number of bytes sent 1617 | # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt 1618 | # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt 1619 | # P9K_IP_RX_RATE | receive rate (since last prompt) 1620 | # P9K_IP_TX_RATE | send rate (since last prompt) 1621 | typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP' 1622 | # Show information for the first network interface whose name matches this regular expression. 1623 | # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. 1624 | typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' 1625 | # Custom icon. 1626 | # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1627 | 1628 | #########################[ proxy: system-wide http/https/ftp proxy ]########################## 1629 | # Proxy color. 1630 | typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4 1631 | typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0 1632 | # Custom icon. 1633 | # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' 1634 | 1635 | ################################[ battery: internal battery ]################################# 1636 | # Show battery in red when it's below this level and not connected to power supply. 1637 | typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 1638 | typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 1639 | # Show battery in green when it's charging or fully charged. 1640 | typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2 1641 | # Show battery in yellow when it's discharging. 1642 | typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 1643 | # Battery pictograms going from low to high level of charge. 1644 | typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' 1645 | # Don't show the remaining time to charge/discharge. 1646 | typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false 1647 | typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0 1648 | 1649 | #####################################[ wifi: wifi speed ]##################################### 1650 | # WiFi color. 1651 | typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0 1652 | typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4 1653 | # Custom icon. 1654 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' 1655 | 1656 | # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). 1657 | # 1658 | # # Wifi colors and icons for different signal strength levels (low to high). 1659 | # typeset -g my_wifi_fg=(0 0 0 0 0) # <-- change these values 1660 | # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values 1661 | # 1662 | # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' 1663 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' 1664 | # 1665 | # The following parameters are accessible within the expansions: 1666 | # 1667 | # Parameter | Meaning 1668 | # ----------------------+--------------- 1669 | # P9K_WIFI_SSID | service set identifier, a.k.a. network name 1670 | # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown 1671 | # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second 1672 | # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 1673 | # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 1674 | # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) 1675 | 1676 | ####################################[ time: current time ]#################################### 1677 | # Current time color. 1678 | typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 1679 | typeset -g POWERLEVEL9K_TIME_BACKGROUND=7 1680 | # Format for the current time: 09:51:02. See `man 3 strftime`. 1681 | typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' 1682 | # If set to true, time will update when you hit enter. This way prompts for the past 1683 | # commands will contain the start times of their commands as opposed to the default 1684 | # behavior where they contain the end times of their preceding commands. 1685 | typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false 1686 | # Custom icon. 1687 | # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' 1688 | # Custom prefix. 1689 | # typeset -g POWERLEVEL9K_TIME_PREFIX='at ' 1690 | 1691 | # Example of a user-defined prompt segment. Function prompt_example will be called on every 1692 | # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or 1693 | # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and yellow text on red background 1694 | # greeting the user. 1695 | # 1696 | # Type `p10k help segment` for documentation and a more sophisticated example. 1697 | function prompt_example() { 1698 | p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n' 1699 | } 1700 | 1701 | # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job 1702 | # is to generate the prompt segment for display in instant prompt. See 1703 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1704 | # 1705 | # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function 1706 | # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k 1707 | # will replay these calls without actually calling instant_prompt_*. It is imperative that 1708 | # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this 1709 | # rule is not observed, the content of instant prompt will be incorrect. 1710 | # 1711 | # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If 1712 | # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. 1713 | function instant_prompt_example() { 1714 | # Since prompt_example always makes the same `p10k segment` calls, we can call it from 1715 | # instant_prompt_example. This will give us the same `example` prompt segment in the instant 1716 | # and regular prompts. 1717 | prompt_example 1718 | } 1719 | 1720 | # User-defined prompt segments can be customized the same way as built-in segments. 1721 | typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3 1722 | typeset -g POWERLEVEL9K_EXAMPLE_BACKGROUND=1 1723 | # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1724 | 1725 | # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt 1726 | # when accepting a command line. Supported values: 1727 | # 1728 | # - off: Don't change prompt when accepting a command line. 1729 | # - always: Trim down prompt when accepting a command line. 1730 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command 1731 | # typed after changing current working directory. 1732 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off 1733 | 1734 | # Instant prompt mode. 1735 | # 1736 | # - off: Disable instant prompt. Choose this if you've tried instant prompt and found 1737 | # it incompatible with your zsh configuration files. 1738 | # - quiet: Enable instant prompt and don't print warnings when detecting console output 1739 | # during zsh initialization. Choose this if you've read and understood 1740 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1741 | # - verbose: Enable instant prompt and print a warning when detecting console output during 1742 | # zsh initialization. Choose this if you've never tried instant prompt, haven't 1743 | # seen the warning, or if you are unsure what this all means. 1744 | typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose 1745 | 1746 | # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. 1747 | # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload 1748 | # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you 1749 | # really need it. 1750 | typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true 1751 | 1752 | # If p10k is already loaded, reload configuration. 1753 | # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. 1754 | (( ! $+functions[p10k] )) || p10k reload 1755 | } 1756 | 1757 | # Tell `p10k configure` which file it should overwrite. 1758 | typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} 1759 | 1760 | (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} 1761 | 'builtin' 'unset' 'p10k_config_opts' 1762 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | git clone https://github.com/algono/dotfiles ~/dotfiles 4 | 5 | if [ -f ~/.bashrc ]; then mv -f ~/.bashrc ~/dotfiles/bash 6 | elif [ -f /etc/skel/.bashrc ]; then cp -f /etc/skel/.bashrc ~/dotfiles/bash 7 | elif uname -r | grep -iq manjaro; then cp ~/dotfiles/.bash-presets/.bashrc-manjaro ~/dotfiles/bash/.bashrc 8 | else cp ~/dotfiles/.bash-presets/.bashrc-wsl ~/dotfiles/bash/.bashrc 9 | fi 10 | 11 | [ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc.bak 12 | 13 | ed ~/dotfiles/bash/.bashrc < ~/dotfiles/.patches/bashrc-patch.ed 14 | 15 | find ~/dotfiles/* -maxdepth 1 -name ".*" -o -type d -prune -printf "%f\n" | xargs /usr/bin/stow -d ~/dotfiles -t ~ 16 | -------------------------------------------------------------------------------- /shell-shared/.shared_aliases: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exists () 4 | { 5 | type "$1" >/dev/null 2>&1 6 | } 7 | 8 | # 9 | # # ex - archive extractor 10 | # # usage: ex 11 | ex () 12 | { 13 | if [ -f $1 ] ; then 14 | case $1 in 15 | *.tar.bz2) tar xjf $@ ;; 16 | *.tar.gz) tar xzf $@ ;; 17 | *.tar.xz) tar xJf $@ ;; 18 | *.bz2) bunzip2 $@ ;; 19 | *.rar) unrar x $@ ;; 20 | *.gz) gunzip $@ ;; 21 | *.tar) tar xf $@ ;; 22 | *.tbz2) tar xjf $@ ;; 23 | *.tgz) tar xzf $@ ;; 24 | *.zip) unzip $@ ;; 25 | *.Z) uncompress $@ ;; 26 | *.7z) 7z x $@ ;; 27 | *) echo "'$1' cannot be extracted via ex()" ;; 28 | esac 29 | else 30 | echo "'$1' is not a valid file" 31 | fi 32 | } 33 | 34 | # ls aliases 35 | alias ls='exa --color=always --group-directories-first' 36 | alias l='ls -lah' 37 | alias la='ls -la' 38 | alias ll='ls -l' 39 | 40 | # (WSL) xdg-open directories in file explorer (for autojump) 41 | if exists wslpath 42 | then 43 | xdg-open () 44 | { 45 | if [ -d "$1" ] 46 | then 47 | explorer.exe "$(wslpath -w "$1")" 48 | else 49 | /usr/bin/xdg-open "$@" 50 | fi 51 | } 52 | fi 53 | 54 | dotfilesDir=~/dotfiles 55 | 56 | # dotfiles stow function 57 | dotfiles () 58 | { 59 | local args 60 | local packages 61 | args=() 62 | packages=() 63 | while test $# -gt 0; do 64 | case "$1" in 65 | -a|--all) 66 | shift 67 | packages=("$(find $dotfilesDir/* -maxdepth 1 -name ".*" -o -type d -prune -printf "%f\n")") 68 | ;; 69 | -r|--rebuild) 70 | shift 71 | packages=("$(find $dotfilesDir/* -maxdepth 1 -name ".*" -o -type d -prune -printf "%f\n")") 72 | if [ -f /etc/skel/.bashrc ] 73 | then 74 | now="$(date -Iseconds)" 75 | cp -f ~/dotfiles/bash/.bashrc ~/.bashrc-$now.bak 76 | rm -f ~/.bashrc 77 | cp -f /etc/skel/.bashrc ~/dotfiles/bash/.bashrc 78 | ed ~/dotfiles/bash/.bashrc < ~/dotfiles/.patches/bashrc-patch.ed 79 | tput setaf 10; 80 | echo "################################################################" 81 | echo "~/.bashrc was successfully rebuilt." 82 | echo "A backup of the original was saved in ~/.bashrc-$now.bak" 83 | echo "################################################################" 84 | echo;tput sgr0 85 | else 86 | tput setaf 11; 87 | echo "################################################################" 88 | echo "WARNING: ~/.bashrc could not be rebuilt." 89 | echo "################################################################" 90 | echo;tput sgr0 91 | fi 92 | args+="-R" 93 | ;; 94 | *) 95 | args+="$1" 96 | shift 97 | ;; 98 | esac 99 | done 100 | 101 | echo "$args[@] $packages[@]" | xargs /usr/bin/stow -d "$dotfilesDir" -t ~ 102 | } 103 | alias dtf='dotfiles' 104 | 105 | # youtube-dl aliases 106 | if exists youtube-dl 107 | then 108 | alias yta='youtube-dl -x --audio-format mp3' 109 | alias ytv='youtube-dl -f mp4' 110 | fi 111 | 112 | # package manager aliases 113 | if exists pacman 114 | then 115 | alias update='sudo pacman -Syu' 116 | 117 | if exists paru 118 | then 119 | aur_helper='paru' 120 | elif exists yay 121 | then 122 | aur_helper='yay' 123 | fi 124 | 125 | if [ -n "$aur_helper" ] 126 | then 127 | alias upall="$aur_helper -Syu" 128 | fi 129 | elif exists apt 130 | then 131 | alias update='sudo apt update && sudo apt upgrade' 132 | alias upall='sudo apt update && sudo apt full-upgrade' 133 | fi 134 | 135 | # backup related aliases 136 | # (source: https://arcolinux.com/superfast-update-of-arcolinux/) 137 | if [ -d "/etc/skel" ] 138 | then 139 | alias skel='cp -Rf ~/.config ~/.config-backup-$(date +%Y.%m.%d-%H.%M.%S) && cp -rf /etc/skel/* ~' 140 | alias cb='sudo cp /etc/skel/.bashrc ~/.bashrc && source ~/.bashrc' 141 | fi 142 | 143 | # Alias for the bat program (a cat replacement) for Debian-based distros. 144 | if exists batcat 145 | then 146 | alias bat='batcat' 147 | fi 148 | 149 | # git aliases 150 | alias ga='git add' 151 | alias gaa='git add -A' 152 | alias gap='git add -p' 153 | alias gai='git add -i' 154 | alias gcm='git commit -m' 155 | alias gp='git push' 156 | alias gpl='git pull' 157 | alias gst='git status' 158 | alias gd='git diff' 159 | alias gds='git diff --staged' 160 | alias gdh='git diff HEAD~1' 161 | alias grh='git reset --hard' 162 | alias grhh='git reset --hard HEAD~1' 163 | alias grs='git reset --soft' 164 | alias grsh='git reset --soft HEAD~1' 165 | alias gsh='git stash' 166 | alias gshu='git stash --include-untracked' 167 | alias gshp='git stash pop' 168 | alias gsha='git stash apply' 169 | alias gshd='git stash drop' 170 | alias gshl='git stash list' 171 | alias gl='git log' 172 | alias gsw='git switch' 173 | 174 | # gh aliases (github-cli) 175 | alias gv='gh repo view -w' 176 | 177 | # Docker aliases 178 | alias d='docker' 179 | alias dps='docker ps -a' 180 | alias dpsa='docker ps -a' 181 | alias di='docker images' 182 | alias dv='docker volume' 183 | alias dvl='docker volume ls' 184 | alias dvls='docker volume ls' 185 | alias drmi='docker rmi' 186 | 187 | # Docker compose aliases 188 | alias dc='docker compose' 189 | alias dcu='docker compose up' 190 | alias dcub='docker compose up --build' 191 | alias dcd='docker compose down' 192 | alias dcda='docker compose down -v --rmi=local' 193 | alias dcdaf='docker compose down -v --rmi=all' 194 | alias dcbld='docker compose build' 195 | alias dcr='docker compose run' 196 | alias dce='docker compose exec' 197 | 198 | # Alias for autojump alternative (zoxide) if it is being used instead of autojump 199 | if exists zoxide 200 | then 201 | alias j='z' 202 | fi 203 | 204 | # Alias for neovim (nvim) if it is being used instead of vim 205 | if exists nvim 206 | then 207 | alias vim='nvim' 208 | fi 209 | -------------------------------------------------------------------------------- /shell-shared/.shared_env: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Set default editor 4 | export EDITOR=vim 5 | 6 | # Add local binaries to PATH 7 | [ ! -d "$HOME/.local/bin" ] || PATH=$PATH:"$HOME/.local/bin" 8 | 9 | # Add cargo binaries to PATH 10 | [ ! -d "$HOME/.cargo/bin" ] || PATH=$PATH:"$HOME/.cargo/bin" 11 | 12 | # Add ghcup binaries to PATH 13 | [ ! -d "$HOME/.ghcup/bin" ] || PATH="$HOME/.ghcup/bin":$PATH 14 | 15 | # Add cabal binaries to PATH 16 | [ ! -d "$HOME/.cabal/bin" ] || PATH=$PATH:"$HOME/.cabal/bin" 17 | 18 | # Load nvm environment variables 19 | export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" 20 | 21 | # Use Chromium as "CHROME_EXECUTABLE" for Flutter 22 | if [ -f /usr/bin/chromium ] 23 | then 24 | export CHROME_EXECUTABLE="/usr/bin/chromium" 25 | fi 26 | 27 | ################################ 28 | ##### Nix package manager ###### 29 | ################################ 30 | 31 | # Load NIX_PATH env 32 | if [ -d "/nix" ] 33 | then 34 | export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH} 35 | fi 36 | 37 | # Load nix profile (if available) 38 | if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then . "$HOME/.nix-profile/etc/profile.d/nix.sh"; fi 39 | 40 | # Load nix home manager session variables (if available) 41 | if [ -e "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"; fi 42 | 43 | ################################ 44 | -------------------------------------------------------------------------------- /zsh/.zshenv: -------------------------------------------------------------------------------- 1 | ../shell-shared/.shared_env -------------------------------------------------------------------------------- /zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # Show neofetch 2 | neofetch 3 | 4 | # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. 5 | # Initialization code that may require console input (password prompts, [y/n] 6 | # confirmations, etc.) must go above this block; everything else may go below. 7 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then 8 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" 9 | fi 10 | 11 | # Set up the prompt 12 | 13 | autoload -Uz promptinit 14 | promptinit 15 | prompt adam1 16 | 17 | setopt histignorealldups sharehistory 18 | 19 | # Custom variables 20 | EDITOR=vim 21 | 22 | # Keep 1000 lines of history within the shell and save it to ~/.zsh_history: 23 | HISTSIZE=1000 24 | SAVEHIST=1000 25 | HISTFILE=~/.zsh_history 26 | 27 | # Use modern completion system 28 | autoload -Uz compinit 29 | compinit 30 | 31 | zstyle ':completion:*' auto-description 'specify: %d' 32 | zstyle ':completion:*' completer _expand _complete _correct _approximate 33 | zstyle ':completion:*' format 'Completing %d' 34 | zstyle ':completion:*' group-name '' 35 | zstyle ':completion:*' menu select=2 36 | eval "$(dircolors -b)" 37 | zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} 38 | zstyle ':completion:*' list-colors '' 39 | zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s 40 | zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' 41 | zstyle ':completion:*' menu select=long 42 | zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s 43 | zstyle ':completion:*' use-compctl false 44 | zstyle ':completion:*' verbose true 45 | 46 | zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' 47 | zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' 48 | 49 | # Load powerline 50 | if [ -f /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme ] 51 | then 52 | # If the Arch Linux package 'zsh-theme-powerlevel10k' is installed, source it 53 | source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme 54 | elif [ -f ~/.zplug/repos/romkatv/powerlevel10k/powerlevel10k.zsh-theme ] 55 | then 56 | # If it was installed through zplug, source it 57 | source ~/.zplug/repos/romkatv/powerlevel10k/powerlevel10k.zsh-theme 58 | else 59 | # In any other case, assume that it is located in the home folder 60 | source ~/powerlevel10k/powerlevel10k.zsh-theme 61 | fi 62 | 63 | # Custom ZSH Binds 64 | # (Ctrl+Space for autosuggest) 65 | bindkey '^ ' autosuggest-accept 66 | 67 | # Load aliases and shortcuts if existent. 68 | [ ! -f "$HOME/zsh/aliasrc" ] || source "$HOME/zsh/aliasrc" 69 | 70 | # Load zsh autosuggestions and syntax highlighting 71 | if [ -d /usr/share/zsh/plugins ] 72 | then 73 | # Arch-based locations 74 | source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null 75 | source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null 76 | else 77 | # Ubuntu-based locations 78 | [ ! -d /usr/share/zsh-autosuggestions ] || source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null 79 | [ ! -d /usr/share/zsh-syntax-highlighting ] || source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null 80 | fi 81 | 82 | # Load zoxide if installed, else load autojump 83 | if exists zoxide 84 | then 85 | eval "$(zoxide init zsh)" 86 | else 87 | source /usr/share/autojump/autojump.zsh 2>/dev/null 88 | fi 89 | 90 | # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. 91 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh 92 | 93 | # Source zsh-nvm plugin (if it exists) 94 | # (https://github.com/lukechilds/zsh-nvm) 95 | 96 | [ ! -f "$HOME/.zsh-nvm/zsh-nvm.plugin.zsh" ] || source "$HOME/.zsh-nvm/zsh-nvm.plugin.zsh" 97 | 98 | # home/end/del keybinds 99 | # urxvt 100 | bindkey "^[[7~" beginning-of-line 101 | bindkey "^[[8~" end-of-line 102 | bindkey "^[[3~" delete-char 103 | # alacritty 104 | bindkey "^[[H" beginning-of-line 105 | bindkey "^[[F" end-of-line 106 | -------------------------------------------------------------------------------- /zsh/zsh/aliasrc: -------------------------------------------------------------------------------- 1 | ../../shell-shared/.shared_aliases --------------------------------------------------------------------------------