├── README.md └── dotfiles ├── .gitignore ├── Library └── LaunchAgents │ └── com.local.KeyRemapping.plist ├── claude-desktop └── claude_desktop_config.json ├── ghostty.txt ├── gitconfig ├── homebrew.list ├── nvim ├── after │ └── plugin │ │ ├── fzf.rc.vim │ │ └── nnn.rc.vim └── init.vim ├── p10k.zsh ├── psqlrc ├── starship.toml ├── tmux.conf ├── tmux.remote.conf ├── vscode-keybindings.json ├── vscode-settings.json ├── vscode.extensions ├── zed-rules ├── fasthtml-web-developer.txt ├── llms-directory.txt └── tailwind-llms-documentation.txt ├── zed-settings.json └── zshrc /README.md: -------------------------------------------------------------------------------- 1 | _Previous version archived at https://github.com/CraigJPerry/dotfiles (I lost access to CraigJPerry a good while ago)_ 2 | 3 | My cross platform (Linux, MacOS, ~~Solaris~~, Windows, FreeBSD, ~~OpenBSD~~) 4 | user configuration files. _2021 Update: some more OS's join AIX & OpenVMS in succumbing to inevitable attrition_ 5 | 6 | ### Changes for 2022 ### 7 | 8 | * neovim is still my vim of choice but my experiment with neovim + LSP is over, back to VSCode 9 | * I revisited Intellij (primary IDE 2012-2020) after an 18 month hiatus and i've decided to stay with VSCode for Go, Python & JS/TS 10 | * VSCode takes on extended responsibilites now as my visual diff & merge tool - i test drove kdiff3, meld & beyond compare before settling on VSCode 11 | * zsh is still my default shell (was bash 1999-2021) but i'm not sure i exploit it much beyond p10k, the better parameter expansion and marginally better completion vs. bash 12 | * I've really settled into tmux now 13 | * Emacs has been catching my eye of late, i've been playing with spacemacs since starting with Common Lisp last year. I don't really want to go all-in on emacs though 14 | * jq is getting more usage now, i've been doing more JSON stuff and sqlite's json facilities are good but jq is easier usually 15 | * Still experimenting with various rust tools, bat, exa, delta, dust, fd, hyperfine & ripgrep are all solid: 16 | * cargo install bandwhich bat broot bottom git-delta deno du-dust exa fd-find gping grex hyperfine procs ripgrep sd tokei xh xsv ytop 17 | 18 | ### Changes for 2021 ### 19 | 20 | * vim is replaced with neovim 21 | * I've ditched bash, i'm now a zsh kinda guy: 22 | * I prefer the completion facilities 23 | * I really like the glob extensions, i can replace find so no more tripping over differences between GNU find and BSD find 24 | * The zmv, zcalc stuff i'm undecided on whether it's useful 25 | * The zftp and the zsh modules stuff i will not use - that's taking shell too far IMO, i'd rather use a more ergonomic language like Python for more advanced scripting 26 | * The more ergonomic parameter expansion could be handy 27 | * The above is all lies to justify rocking a bling eye-candy powerline10k prompt 28 | * screen is gone, tmux won 29 | * I'm more assertive about using vim keybindings everywhere so i don't need to learn new keybindings for every tool 30 | 31 | 32 | ### Philosophy ### 33 | 34 | 1. Document everything, use long-hand options where possible. I want 35 | to be able to grok even the obscure bits months from now. 36 | 2. Don't be too opinionated, don't go remapping keys willy-nilly, 37 | it'll just cause pain when you have to use someone else's session. 38 | 39 | 40 | ### Installation ### 41 | 42 | Comes with (optional) [ansible playbook](http://www.ansibleworks.com) 43 | install.yml to automate the installation of dotfiles and associated 44 | setup tasks. 45 | 46 | [testing@r4 ~]$ git clone https://github.com/CraigJPerry/dotfiles.git .dotfiles 47 | [testing@r4 ~]$ cd .dotfiles 48 | [testing@r4 .dotfiles]$ ansible-playbook --connection=local --inventory-file=localhost, install.yml 49 | 50 | PLAY [localhost] ************************************************************** 51 | 52 | GATHERING FACTS *************************************************************** 53 | ok: [localhost] 54 | 55 | TASK: [INSTALL DOTFILES | Link New Dotfiles] ********************************** 56 | ok: [localhost] => (item={'dest': '.bashrc', 'source': 'bashrc'}) 57 | ok: [localhost] => (item={'dest': '.bash_profile', 'source': 'bash_profile'}) 58 | ok: [localhost] => (item={'dest': '.bash_logout', 'source': 'bash_logout'}) 59 | ok: [localhost] => (item={'dest': '.gitconfig', 'source': 'gitconfig'}) 60 | ok: [localhost] => (item={'dest': '.vimrc', 'source': 'vimrc'}) 61 | ok: [localhost] => (item={'dest': '.conkyrc', 'source': 'conkyrc'}) 62 | ok: [localhost] => (item={'dest': '.config/autostart/conky.desktop', 'source': 'conky.desktop'}) 63 | 64 | TASK: [CONKY | Install Conky] ************************************************* 65 | ok: [localhost] 66 | 67 | TASK: [INSTALL VIM PLUGINS | Pre-requisite RPMs] ****************************** 68 | ok: [localhost] => (item=vim-enhanced,python-pip) 69 | 70 | TASK: [INSTALL VIM PLUGINS | Pre-requisite Python Modules] ******************** 71 | ok: [localhost] => (item=jedi) 72 | ok: [localhost] => (item=pylint) 73 | ok: [localhost] => (item=pep8) 74 | 75 | TASK: [INSTALL VIM PLUGINS | Vim Bundle Directory] **************************** 76 | ok: [localhost] 77 | 78 | TASK: [INSTALL VIM PLUGINS | Vundle Plugin Manager] *************************** 79 | ok: [localhost] 80 | 81 | TASK: [INSTALL VIM PLUGINS | Install Vundle Bundles] ************************** 82 | skipping: [localhost] 83 | 84 | TASK: [DIRS | Github] ********************************************************* 85 | ok: [localhost] 86 | 87 | TASK: [DIRS | Gists] ********************************************************** 88 | ok: [localhost] 89 | 90 | TASK: [DIRS | Local] ********************************************************** 91 | ok: [localhost] 92 | 93 | TASK: [SSH | Check Key] ******************************************************* 94 | ok: [localhost] 95 | 96 | TASK: [SSH | Make dir] ******************************************************** 97 | skipping: [localhost] 98 | 99 | TASK: [SSH | Generate Key] **************************************************** 100 | skipping: [localhost] 101 | 102 | PLAY RECAP ******************************************************************** 103 | localhost : ok=11 changed=0 unreachable=0 failed=0 104 | 105 | You could copy the files instead, but you'll have to do any other setup manually. 106 | 107 | 108 | ### Tools ### 109 | 110 | * Shell: zsh 111 | * Editor: neovim, VSCode (with VSCodeVim for now but considering the neovim plugin, i miss my :g command) 112 | * File Manager: nnn _i recompile this with O_NERD=1_ 113 | * Terminal Multiplexer: tmux 114 | * Keyboard Macros 115 | * Windows: AHK 116 | * MacOS: Karabiner Elements + MacOS Keyboard Text shortcuts (which i discovered iCloud sync to iOS, natch!!) 117 | * Misc CLI Handy Tools 118 | * GNU units: the ultimate conversion calculation tool 119 | * JSON 120 | * jq: I still use this as if its only feature were python -m json.tool, i should invest some time 121 | * gron: Make json grep-able 122 | * pipx: Don't manually manage virtualenvs for python tools 123 | * datasette: sqlite+web tool for data analysis 124 | * poetry: Python dependency management automation 125 | * httpie: Convenience for working with APIs 126 | * ansible: i still occasionally have nightmares about CFEngine3, the GitOps ideas are bringing iterative convergence back and i'm *shook* 127 | * lnav: logfile navigator, you don't regexp your way to the next minute/hour/error/whatever in a log, it has keybindings and teleports you instantly. The real killer feature is annotating logs with comments. Why did it take me so long to find this tool... 128 | 129 | -------------------------------------------------------------------------------- /dotfiles/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | -------------------------------------------------------------------------------- /dotfiles/Library/LaunchAgents/com.local.KeyRemapping.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Label 6 | com.local.KeyRemapping 7 | ProgramArguments 8 | 9 | /usr/bin/hidutil 10 | property 11 | --set 12 | {"UserKeyMapping":[ 13 | { 14 | "HIDKeyboardModifierMappingSrc": 0x700000039, 15 | "HIDKeyboardModifierMappingDst": 0x70000002A 16 | } 17 | ]} 18 | 19 | RunAtLoad 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /dotfiles/claude-desktop/claude_desktop_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "globalShortcut": "Alt+Space", 3 | "mcpServers": { 4 | "claude-code": { 5 | "command": "uvx", 6 | "args": [ 7 | "--from", 8 | "mcp-claude-code", 9 | "claudecode", 10 | "--allow-path", 11 | "/Users/craig/Code/local/project-name" 12 | ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dotfiles/ghostty.txt: -------------------------------------------------------------------------------- 1 | theme = dark:Builtin Solarized Dark,light:Builtin Solarized Light 2 | font-size = 14 3 | keybind = global:ctrl+opt+v=toggle_quick_terminal 4 | 5 | -------------------------------------------------------------------------------- /dotfiles/gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Craig J Perry 3 | email = craigp84@gmail.com 4 | 5 | [core] 6 | editor = code --wait --new-window 7 | # pager = delta 8 | 9 | #[interactive] 10 | # diffFilter = delta --color-only 11 | 12 | #[delta] 13 | # navigate = true # use n and N to move between diff sections 14 | # line-numbers = true 15 | # side-by-side = true 16 | # hyperlinks = true 17 | # # syntax-theme = "Solarized (light)" 18 | 19 | [merge] 20 | # conflictstyle = zdiff3 21 | # tool = pycharm 22 | tool = vscode 23 | 24 | [diff] 25 | # tool = pycharm 26 | tool = vscode 27 | 28 | [color] 29 | ui = auto 30 | 31 | [alias] 32 | # TAB select which files to git add 33 | a = "!git status --short | fzf -m | awk '{print $2}' | xargs git add" 34 | ac = "!f(){ git add --all . ; git commit --all --message=\"$1\"; };f" 35 | b = "!git branch -q -a --color=always | sed -e 's/^..//' -e '/->/d' | fzf --ansi --preview-window right:75% --preview 'git log -n $(( $( tput lines ) - 3 )) --color=always --pretty=reference {}' | xargs git switch" 36 | cm = commit --message 37 | # d = diff 38 | # ds = diff --staged 39 | d = difftool 40 | ds = difftool --staged 41 | l = log --topo-order --first-parent --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' 42 | la = log --all --topo-order --first-parent --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' 43 | lg = log --all --oneline --graph --decorate 44 | ps = "!git push origin $(git symbolic-ref --short HEAD)" 45 | pl = "!git pull origin $(git symbolic-ref --short HEAD)" 46 | s = status --short --branch 47 | w = whatchanged 48 | ctop = !git log | grep Author | sort | uniq -c | sort -rn 49 | ltop = !git ls-files | xargs -n1 git blame --line-porcelain HEAD | grep '^author ' | sort | uniq -c | sort -nr 50 | find = "!f() { git log --pretty=format:\"%h %cd [%cn] %s%d\" --date=relative -S'pretty' -S\"$@\" | fzf -m | awk '{print $1}' | xargs -I {} git diff {}^ {}; }; f" 51 | # edit conflicted file on merge 52 | edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`" 53 | # add conflicted file on merge 54 | add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`" 55 | 56 | [pull] 57 | ff = only 58 | 59 | [init] 60 | defaultBranch = main 61 | 62 | [difftool "vscode"] 63 | cmd = code --new-window --wait --diff \"$LOCAL\" \"$REMOTE\" 64 | 65 | [mergetool "vscode"] 66 | cmd = code --new-window --wait \"$MERGED\" 67 | 68 | #[difftool "pycharm"] 69 | # cmd = pycharm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read 70 | # 71 | #[mergetool "pycharm"] 72 | # cmd = pycharm merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED" && echo "Press enter to continue..." && read 73 | 74 | -------------------------------------------------------------------------------- /dotfiles/homebrew.list: -------------------------------------------------------------------------------- 1 | babashka 2 | bat 3 | bottom 4 | broot 5 | clojure 6 | coreutils 7 | deno 8 | diskonaut 9 | dog 10 | duf 11 | dust 12 | exa 13 | fd 14 | fzf 15 | git-delta 16 | gnu-sed 17 | go 18 | gping 19 | graphene 20 | graphite2 21 | hyperfine 22 | imagemagick 23 | iperf3 24 | jq 25 | luv 26 | m4 27 | maven 28 | msgpack 29 | ncurses 30 | neovim 31 | nnn 32 | node@16 33 | openjdk 34 | pipx 35 | podman 36 | procs 37 | python@3.10 38 | python@3.11 39 | qemu 40 | ripgrep 41 | rlwrap 42 | rust-analyzer 43 | sbcl 44 | snappy 45 | speedtest-cli 46 | sqlite 47 | subversion 48 | syncthing 49 | tmux 50 | wakeonlan 51 | wget 52 | xh 53 | xsv 54 | xz 55 | yarn 56 | yt-dlp 57 | dbeaver-community 58 | firefox 59 | font-jetbrains-mono-nerd-font 60 | ghidra 61 | google-chrome-dev 62 | iina 63 | imageoptim 64 | iterm2 65 | plexamp 66 | podman-desktop 67 | qbittorrent 68 | racket 69 | raycast 70 | visual-studio-code 71 | zoom 72 | -------------------------------------------------------------------------------- /dotfiles/nvim/after/plugin/fzf.rc.vim: -------------------------------------------------------------------------------- 1 | " fzf.vim plugin *************************************************************** 2 | nnoremap zr :Rg 3 | nnoremap zl :Lines 4 | nnoremap zm :Marks 5 | nnoremap zf :Files 6 | nnoremap zb :Buffers 7 | nnoremap zg :GFiles 8 | nnoremap zt :Tags 9 | nnoremap zh :History: 10 | nnoremap z/ :History/ 11 | 12 | -------------------------------------------------------------------------------- /dotfiles/nvim/after/plugin/nnn.rc.vim: -------------------------------------------------------------------------------- 1 | " nnn plugin ******************************************************************* 2 | 3 | let g:nnn#layout = {'window': {'width':0.9, 'height':0.6, 'highlight':'Debug'}} 4 | let g:nnn#action = {'': 'split', '': 'vsplit'} 5 | 6 | -------------------------------------------------------------------------------- /dotfiles/nvim/init.vim: -------------------------------------------------------------------------------- 1 | " Fundamentals "{{{ 2 | " --------------------------------------------------------------------- 3 | 4 | " init autocmd 5 | autocmd! 6 | scriptencoding utf-8 7 | set nocompatible 8 | set number 9 | syntax enable 10 | set fileencodings=utf-8,latin 11 | set encoding=utf-8 12 | set autoindent 13 | set nobackup 14 | set nohlsearch 15 | set showcmd 16 | " set cmdheight=1 17 | " set laststatus=2 18 | set scrolloff=5 19 | set expandtab 20 | 21 | set inccommand=split 22 | 23 | " Don't redraw while executing macros 24 | set lazyredraw 25 | 26 | 27 | set smarttab 28 | filetype plugin indent on 29 | set tabstop=2 30 | set shiftwidth=2 31 | set ai 32 | set si 33 | set nowrap 34 | set backspace=start,eol,indent 35 | " Finding files - Search down into subfolders 36 | set path+=** 37 | set wildignore+=*/node_modules/* 38 | 39 | " Turn off paste mode when leaving insert 40 | autocmd InsertLeave * set nopaste 41 | " Toggle paste mode 42 | nnoremap :set invpaste paste? 43 | "set pastetoggle= 44 | 45 | " Add asterisks in block comments 46 | set formatoptions+=r 47 | 48 | let mapleader=" " 49 | 50 | "}}} 51 | 52 | " Highlights "{{{ 53 | " --------------------------------------------------------------------- 54 | set cursorline 55 | 56 | "}}} 57 | 58 | " File types "{{{ 59 | " --------------------------------------------------------------------- 60 | " Restore last cursor position on re-opening a file & scroll to middle of screen 61 | autocmd BufReadPost * 62 | \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' 63 | \ | exe "normal! g`\"" 64 | \ | exe "normal! zz" 65 | \ | endif 66 | 67 | " JavaScript 68 | au BufNewFile,BufRead *.es6 setf javascript 69 | " TypeScript 70 | au BufNewFile,BufRead *.tsx setf typescriptreact 71 | " Markdown 72 | au BufNewFile,BufRead *.md set filetype=markdown 73 | au BufNewFile,BufRead *.mdx set filetype=markdown 74 | 75 | set suffixesadd=.js,.es,.jsx,.json,.css,.less,.sass,.styl,.py,.md 76 | 77 | autocmd FileType yaml setlocal shiftwidth=2 tabstop=2 78 | 79 | "}}} 80 | 81 | " Plugins "{{{ 82 | " --------------------------------------------------------------------- 83 | " install vim-plugged then :PlugInstall 84 | 85 | call plug#begin('~/.vim/plugged') 86 | Plug 'mcchrish/nnn.vim' 87 | Plug 'tpope/vim-surround' 88 | Plug 'tpope/vim-unimpaired' 89 | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } 90 | Plug 'junegunn/fzf.vim' 91 | Plug 'altercation/vim-colors-solarized' 92 | Plug 'hoob3rt/lualine.nvim' 93 | Plug 'kyazdani42/nvim-web-devicons' 94 | Plug 'justinmk/vim-sneak' 95 | call plug#end() 96 | 97 | if has("unix") 98 | let s:uname = system("uname -s") 99 | if s:uname == "Darwin\n" 100 | " Use OSX clipboard to copy and to paste 101 | set clipboard+=unnamedplus 102 | endif 103 | endif 104 | if has('win32') 105 | " Use Windows clipboard to copy and to paste 106 | set clipboard^=unnamed,unnamedplus 107 | endif 108 | 109 | "}}} 110 | 111 | " Mappings "{{{ 112 | " --------------------------------------------------------------------- 113 | 114 | " Splits, used with C-w H/K to rearrange them 115 | set splitright 116 | set splitbelow 117 | nnoremap - :new 118 | nnoremap \| :vnew 119 | 120 | " Navigate windows 121 | " map sh h 122 | " map sk k 123 | " map sj j 124 | " map sl l 125 | " map sd q 126 | 127 | " Resize windows 128 | nmap < 129 | nmap > 130 | nmap + 131 | nmap - 132 | 133 | " Buffer management 134 | nnoremap bl :ls:buffer 135 | nnoremap bj :bj 136 | nnoremap bk :bk 137 | nnoremap bd :bd 138 | 139 | nmap te :tabedit 140 | nmap :tabprev 141 | nmap :tabnext 142 | 143 | " Shortcut to edit this config 144 | nnoremap ec :e $MYVIMRC 145 | nnoremap sc :source $MYVIMRC 146 | 147 | inoremap jk 148 | 149 | " Map Y like D, C etc. behave (to end of line) 150 | nnoremap Y y$ 151 | 152 | " Delete without yank, e.g. dw or dd 153 | nnoremap d "_d 154 | xnoremap d "_d 155 | nnoremap x "_x 156 | 157 | " Save with root permission 158 | command! W w !sudo tee > /dev/null %" Move lines up or down 159 | 160 | nnoremap :m .+1== 161 | nnoremap :m .-2== 162 | inoremap :m .+1==gi 163 | inoremap :m .-2==gi 164 | vnoremap :m '>+1gv=gv 165 | vnoremap :m '<-2gv=gv 166 | 167 | "}}} 168 | 169 | " Theme "{{{ 170 | 171 | set background=light 172 | colorscheme solarized 173 | 174 | "}}} 175 | 176 | " za|zR|zM - toggle|open all|close all folds 177 | " vim: set foldmethod=marker foldlevel=20: 178 | -------------------------------------------------------------------------------- /dotfiles/p10k.zsh: -------------------------------------------------------------------------------- 1 | # Generated by Powerlevel10k configuration wizard on 2023-05-07 at 16:28 BST. 2 | # Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 53788. 3 | # Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 1 line, 4 | # compact, few icons, concise, transient_prompt, instant_prompt=verbose. 5 | # Type `p10k configure` to generate another config. 6 | # 7 | # Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate 8 | # your own config based on it. 9 | # 10 | # Tip: Looking for a nice color? Here's a one-liner to print colormap. 11 | # 12 | # for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done 13 | 14 | # Temporarily change options. 15 | 'builtin' 'local' '-a' 'p10k_config_opts' 16 | [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') 17 | [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') 18 | [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') 19 | 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' 20 | 21 | () { 22 | emulate -L zsh -o extended_glob 23 | 24 | # Unset all configuration options. This allows you to apply configuration changes without 25 | # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. 26 | unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' 27 | 28 | # Zsh >= 5.1 is required. 29 | [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return 30 | 31 | # The list of segments shown on the left. Fill it with the most important segments. 32 | typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( 33 | time # current time 34 | # os_icon # os identifier 35 | background_jobs # presence of background jobs 36 | status # exit code of the last command 37 | command_execution_time # duration of the last command 38 | context # user@hostname 39 | dir # current directory 40 | vcs # git status 41 | # direnv # direnv status (https://direnv.net/) 42 | # asdf # asdf version manager (https://github.com/asdf-vm/asdf) 43 | virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) 44 | anaconda # conda environment (https://conda.io/) 45 | pyenv # python environment (https://github.com/pyenv/pyenv) 46 | goenv # go environment (https://github.com/syndbg/goenv) 47 | nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) 48 | # nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) 49 | nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) 50 | # node_version # node.js version 51 | # go_version # go version (https://golang.org) 52 | # rust_version # rustc version (https://www.rust-lang.org) 53 | # dotnet_version # .NET version (https://dotnet.microsoft.com) 54 | # php_version # php version (https://www.php.net/) 55 | # laravel_version # laravel php framework version (https://laravel.com/) 56 | # java_version # java version (https://www.java.com/) 57 | # package # name@version from package.json (https://docs.npmjs.com/files/package.json) 58 | # rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) 59 | # rvm # ruby version from rvm (https://rvm.io) 60 | # fvm # flutter version management (https://github.com/leoafarias/fvm) 61 | # luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) 62 | jenv # java version from jenv (https://github.com/jenv/jenv) 63 | # plenv # perl version from plenv (https://github.com/tokuhirom/plenv) 64 | # perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew) 65 | # phpenv # php version from phpenv (https://github.com/phpenv/phpenv) 66 | # scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) 67 | # haskell_stack # haskell version from stack (https://haskellstack.org/) 68 | kubecontext # current kubernetes context (https://kubernetes.io/) 69 | terraform # terraform workspace (https://www.terraform.io) 70 | # terraform_version # terraform version (https://www.terraform.io) 71 | aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) 72 | aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) 73 | azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) 74 | gcloud # google cloud cli account and project (https://cloud.google.com/) 75 | google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) 76 | toolbox # toolbox name (https://github.com/containers/toolbox) 77 | nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) 78 | # ranger # ranger shell (https://github.com/ranger/ranger) 79 | nnn # nnn shell (https://github.com/jarun/nnn) 80 | # lf # lf shell (https://github.com/gokcehan/lf) 81 | # xplr # xplr shell (https://github.com/sayanarijit/xplr) 82 | vim_shell # vim shell indicator (:sh) 83 | # midnight_commander # midnight commander shell (https://midnight-commander.org/) 84 | # nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 85 | # vpn_ip # virtual private network indicator 86 | # load # CPU load 87 | # disk_usage # disk usage 88 | # ram # free RAM 89 | # swap # used swap 90 | # todo # todo items (https://github.com/todotxt/todo.txt-cli) 91 | # timewarrior # timewarrior tracking status (https://timewarrior.net/) 92 | # taskwarrior # taskwarrior task count (https://taskwarrior.org/) 93 | # cpu_arch # CPU architecture 94 | # ip # ip address and bandwidth usage for a specified network interface 95 | # public_ip # public IP address 96 | # proxy # system-wide http/https/ftp proxy 97 | # battery # internal battery 98 | # wifi # wifi speed 99 | # example # example user-defined segment (see prompt_example function below) 100 | prompt_char # prompt symbol 101 | ) 102 | 103 | # The list of segments shown on the right. Fill it with less important segments. 104 | # Right prompt on the last prompt line (where you are typing your commands) gets 105 | # automatically hidden when the input line reaches it. Right prompt above the 106 | # last prompt line gets hidden if it would overlap with left prompt. 107 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( 108 | ) 109 | 110 | # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. 111 | typeset -g POWERLEVEL9K_MODE=nerdfont-complete 112 | # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid 113 | # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. 114 | typeset -g POWERLEVEL9K_ICON_PADDING=none 115 | 116 | # Basic style options that define the overall look of your prompt. You probably don't want to 117 | # change them. 118 | typeset -g POWERLEVEL9K_BACKGROUND= # transparent background 119 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace 120 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space 121 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol 122 | 123 | # When set to true, icons appear before content on both sides of the prompt. When set 124 | # to false, icons go after content. If empty or not set, icons go before content in the left 125 | # prompt and after content in the right prompt. 126 | # 127 | # You can also override it for a specific segment: 128 | # 129 | # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false 130 | # 131 | # Or for a specific segment in specific state: 132 | # 133 | # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false 134 | typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true 135 | 136 | # Add an empty line before each prompt. 137 | typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false 138 | 139 | # Connect left prompt lines with these symbols. 140 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= 141 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= 142 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= 143 | # Connect right prompt lines with these symbols. 144 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= 145 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= 146 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= 147 | 148 | # The left end of left prompt. 149 | typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= 150 | # The right end of right prompt. 151 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= 152 | 153 | # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll 154 | # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and 155 | # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. 156 | typeset -g POWERLEVEL9K_SHOW_RULER=false 157 | typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' 158 | typeset -g POWERLEVEL9K_RULER_FOREGROUND=242 159 | 160 | # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' 161 | # to make it easier to see the alignment between left and right prompt and to separate prompt 162 | # from command output. It serves the same purpose as ruler (see above) without increasing 163 | # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false 164 | # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact 165 | # prompt. 166 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' 167 | if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then 168 | # The color of the filler. 169 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 170 | # Add a space between the end of left prompt and the filler. 171 | typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' 172 | # Add a space between the filler and the start of right prompt. 173 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' 174 | # Start filler from the edge of the screen if there are no left segments on the first line. 175 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' 176 | # End filler on the edge of the screen if there are no right segments on the first line. 177 | typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' 178 | fi 179 | 180 | #################################[ os_icon: os identifier ]################################## 181 | # OS identifier color. 182 | typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= 183 | # Custom icon. 184 | # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' 185 | 186 | ################################[ prompt_char: prompt symbol ]################################ 187 | # Green prompt symbol if the last command succeeded. 188 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 189 | # Red prompt symbol if the last command failed. 190 | typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 191 | # Default prompt symbol. 192 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' 193 | # Prompt symbol in command vi mode. 194 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' 195 | # Prompt symbol in visual vi mode. 196 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' 197 | # Prompt symbol in overwrite vi mode. 198 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' 199 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true 200 | # No line terminator if prompt_char is the last segment. 201 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' 202 | # No line introducer if prompt_char is the first segment. 203 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= 204 | 205 | ##################################[ dir: current directory ]################################## 206 | # Default current directory color. 207 | typeset -g POWERLEVEL9K_DIR_FOREGROUND=31 208 | # If directory is too long, shorten some of its segments to the shortest possible unique 209 | # prefix. The shortened directory can be tab-completed to the original. 210 | typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique 211 | # Replace removed segment suffixes with this symbol. 212 | typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= 213 | # Color of the shortened directory segments. 214 | typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 215 | # Color of the anchor directory segments. Anchor segments are never shortened. The first 216 | # segment is always an anchor. 217 | typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 218 | # Display anchor directory segments in bold. 219 | typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true 220 | # Don't shorten directories that contain any of these files. They are anchors. 221 | local anchor_files=( 222 | .bzr 223 | .citc 224 | .git 225 | .hg 226 | .node-version 227 | .python-version 228 | .go-version 229 | .ruby-version 230 | .lua-version 231 | .java-version 232 | .perl-version 233 | .php-version 234 | .tool-version 235 | .shorten_folder_marker 236 | .svn 237 | .terraform 238 | CVS 239 | Cargo.toml 240 | composer.json 241 | go.mod 242 | package.json 243 | stack.yaml 244 | ) 245 | typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" 246 | # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains 247 | # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is 248 | # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) 249 | # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers 250 | # and other directories don't. 251 | # 252 | # Optionally, "first" and "last" can be followed by ":" where is an integer. 253 | # This moves the truncation point to the right (positive offset) or to the left (negative offset) 254 | # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" 255 | # respectively. 256 | typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false 257 | # Don't shorten this many last directory segments. They are anchors. 258 | typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 259 | # Shorten directory if it's longer than this even if there is space for it. The value can 260 | # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, 261 | # directory will be shortened only when prompt doesn't fit or when other parameters demand it 262 | # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). 263 | # If set to `0`, directory will always be shortened to its minimum length. 264 | typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 265 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this 266 | # many columns for typing commands. 267 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 268 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least 269 | # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. 270 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 271 | # If set to true, embed a hyperlink into the directory. Useful for quickly 272 | # opening a directory in the file manager simply by clicking the link. 273 | # Can also be handy when the directory is shortened, as it allows you to see 274 | # the full directory that was used in previous commands. 275 | typeset -g POWERLEVEL9K_DIR_HYPERLINK=false 276 | 277 | # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON 278 | # and POWERLEVEL9K_DIR_CLASSES below. 279 | typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 280 | 281 | # The default icon shown next to non-writable and non-existent directories when 282 | # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. 283 | # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' 284 | 285 | # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different 286 | # directories. It must be an array with 3 * N elements. Each triplet consists of: 287 | # 288 | # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with 289 | # extended_glob option enabled. 290 | # 2. Directory class for the purpose of styling. 291 | # 3. An empty string. 292 | # 293 | # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. 294 | # 295 | # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories 296 | # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. 297 | # 298 | # For example, given these settings: 299 | # 300 | # typeset -g POWERLEVEL9K_DIR_CLASSES=( 301 | # '~/work(|/*)' WORK '' 302 | # '~(|/*)' HOME '' 303 | # '*' DEFAULT '') 304 | # 305 | # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one 306 | # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or 307 | # WORK_NON_EXISTENT. 308 | # 309 | # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an 310 | # option to define custom colors and icons for different directory classes. 311 | # 312 | # # Styling for WORK. 313 | # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' 314 | # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 315 | # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 316 | # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 317 | # 318 | # # Styling for WORK_NOT_WRITABLE. 319 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 320 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 321 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 322 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 323 | # 324 | # # Styling for WORK_NON_EXISTENT. 325 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' 326 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 327 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 328 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 329 | # 330 | # If a styling parameter isn't explicitly defined for some class, it falls back to the classless 331 | # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls 332 | # back to POWERLEVEL9K_DIR_FOREGROUND. 333 | # 334 | typeset -g POWERLEVEL9K_DIR_CLASSES=() 335 | 336 | # Custom prefix. 337 | # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' 338 | 339 | #####################################[ vcs: git status ]###################################### 340 | # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. 341 | typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= 342 | 343 | # Untracked files icon. It's really a question mark, your font isn't broken. 344 | # Change the value of this parameter to show a different icon. 345 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' 346 | 347 | # Formatter for Git status. 348 | # 349 | # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. 350 | # 351 | # You can edit the function to customize how Git status looks. 352 | # 353 | # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: 354 | # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. 355 | function my_git_formatter() { 356 | emulate -L zsh 357 | 358 | if [[ -n $P9K_CONTENT ]]; then 359 | # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from 360 | # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. 361 | typeset -g my_git_format=$P9K_CONTENT 362 | return 363 | fi 364 | 365 | if (( $1 )); then 366 | # Styling for up-to-date Git status. 367 | local meta='%f' # default foreground 368 | local clean='%76F' # green foreground 369 | local modified='%178F' # yellow foreground 370 | local untracked='%39F' # blue foreground 371 | local conflicted='%196F' # red foreground 372 | else 373 | # Styling for incomplete and stale Git status. 374 | local meta='%244F' # grey foreground 375 | local clean='%244F' # grey foreground 376 | local modified='%244F' # grey foreground 377 | local untracked='%244F' # grey foreground 378 | local conflicted='%244F' # grey foreground 379 | fi 380 | 381 | local res 382 | 383 | if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then 384 | local branch=${(V)VCS_STATUS_LOCAL_BRANCH} 385 | # If local branch name is at most 32 characters long, show it in full. 386 | # Otherwise show the first 12 … the last 12. 387 | # Tip: To always show local branch name in full without truncation, delete the next line. 388 | (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line 389 | res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" 390 | fi 391 | 392 | if [[ -n $VCS_STATUS_TAG 393 | # Show tag only if not on a branch. 394 | # Tip: To always show tag, delete the next line. 395 | && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line 396 | ]]; then 397 | local tag=${(V)VCS_STATUS_TAG} 398 | # If tag name is at most 32 characters long, show it in full. 399 | # Otherwise show the first 12 … the last 12. 400 | # Tip: To always show tag name in full without truncation, delete the next line. 401 | (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line 402 | res+="${meta}#${clean}${tag//\%/%%}" 403 | fi 404 | 405 | # Display the current Git commit if there is no branch and no tag. 406 | # Tip: To always display the current Git commit, delete the next line. 407 | [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line 408 | res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" 409 | 410 | # Show tracking branch name if it differs from local branch. 411 | if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then 412 | res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" 413 | fi 414 | 415 | # Display "wip" if the latest commit's summary contains "wip" or "WIP". 416 | if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then 417 | res+=" ${modified}wip" 418 | fi 419 | 420 | # ⇣42 if behind the remote. 421 | (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" 422 | # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. 423 | (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " 424 | (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" 425 | # ⇠42 if behind the push remote. 426 | (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" 427 | (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " 428 | # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. 429 | (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" 430 | # *42 if have stashes. 431 | (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" 432 | # 'merge' if the repo is in an unusual state. 433 | [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" 434 | # ~42 if have merge conflicts. 435 | (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" 436 | # +42 if have staged changes. 437 | (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" 438 | # !42 if have unstaged changes. 439 | (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" 440 | # ?42 if have untracked files. It's really a question mark, your font isn't broken. 441 | # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. 442 | # Remove the next line if you don't want to see untracked files at all. 443 | (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" 444 | # "─" if the number of unstaged files is unknown. This can happen due to 445 | # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower 446 | # than the number of files in the Git index, or due to bash.showDirtyState being set to false 447 | # in the repository config. The number of staged and untracked files may also be unknown 448 | # in this case. 449 | (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" 450 | 451 | typeset -g my_git_format=$res 452 | } 453 | functions -M my_git_formatter 2>/dev/null 454 | 455 | # Don't count the number of unstaged, untracked and conflicted files in Git repositories with 456 | # more than this many files in the index. Negative value means infinity. 457 | # 458 | # If you are working in Git repositories with tens of millions of files and seeing performance 459 | # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output 460 | # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's 461 | # config: `git config bash.showDirtyState false`. 462 | typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 463 | 464 | # Don't show Git status in prompt for repositories whose workdir matches this pattern. 465 | # For example, if set to '~', the Git repository at $HOME/.git will be ignored. 466 | # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. 467 | typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' 468 | 469 | # Disable the default Git status formatting. 470 | typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true 471 | # Install our own Git status formatter. 472 | typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' 473 | typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' 474 | # Enable counters for staged, unstaged, etc. 475 | typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 476 | 477 | # Icon color. 478 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 479 | typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 480 | # Custom icon. 481 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= 482 | # Custom prefix. 483 | # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' 484 | 485 | # Show status of repositories of these types. You can add svn and/or hg if you are 486 | # using them. If you do, your prompt may become slow even when your current directory 487 | # isn't in an svn or hg repository. 488 | typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) 489 | 490 | # These settings are used for repositories other than Git or when gitstatusd fails and 491 | # Powerlevel10k has to fall back to using vcs_info. 492 | typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 493 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 494 | typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 495 | 496 | ##########################[ status: exit code of the last command ]########################### 497 | # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and 498 | # style them independently from the regular OK and ERROR state. 499 | typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true 500 | 501 | # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as 502 | # it will signify success by turning green. 503 | typeset -g POWERLEVEL9K_STATUS_OK=false 504 | typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 505 | typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' 506 | 507 | # Status when some part of a pipe command fails but the overall exit status is zero. It may look 508 | # like this: 1|0. 509 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true 510 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 511 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' 512 | 513 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as 514 | # it will signify error by turning red. 515 | typeset -g POWERLEVEL9K_STATUS_ERROR=false 516 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 517 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' 518 | 519 | # Status when the last command was terminated by a signal. 520 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true 521 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 522 | # Use terse signal names: "INT" instead of "SIGINT(2)". 523 | typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false 524 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' 525 | 526 | # Status when some part of a pipe command fails and the overall exit status is also non-zero. 527 | # It may look like this: 1|0. 528 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true 529 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 530 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' 531 | 532 | ###################[ command_execution_time: duration of the last command ]################### 533 | # Show duration of the last command if takes at least this many seconds. 534 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 535 | # Show this many fractional digits. Zero means round to seconds. 536 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 537 | # Execution time color. 538 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 539 | # Duration format: 1d 2h 3m 4s. 540 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' 541 | # Custom icon. 542 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= 543 | # Custom prefix. 544 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' 545 | 546 | #######################[ background_jobs: presence of background jobs ]####################### 547 | # Don't show the number of background jobs. 548 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false 549 | # Background jobs color. 550 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 551 | # Custom icon. 552 | # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' 553 | 554 | #######################[ direnv: direnv status (https://direnv.net/) ]######################## 555 | # Direnv color. 556 | typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 557 | # Custom icon. 558 | # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 559 | 560 | ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### 561 | # Default asdf color. Only used to display tools for which there is no color override (see below). 562 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. 563 | typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 564 | 565 | # There are four parameters that can be used to hide asdf tools. Each parameter describes 566 | # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at 567 | # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to 568 | # hide a tool, it gets shown. 569 | # 570 | # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and 571 | # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: 572 | # 573 | # asdf local python 3.8.1 574 | # asdf global python 3.8.1 575 | # 576 | # After running both commands the current python version is 3.8.1 and its source is "local" as 577 | # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, 578 | # it'll hide python version in this case because 3.8.1 is the same as the global version. 579 | # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't 580 | # contain "local". 581 | 582 | # Hide tool versions that don't come from one of these sources. 583 | # 584 | # Available sources: 585 | # 586 | # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" 587 | # - local `asdf current` says "set by /some/not/home/directory/file" 588 | # - global `asdf current` says "set by /home/username/file" 589 | # 590 | # Note: If this parameter is set to (shell local global), it won't hide tools. 591 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. 592 | typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) 593 | 594 | # If set to false, hide tool versions that are the same as global. 595 | # 596 | # Note: The name of this parameter doesn't reflect its meaning at all. 597 | # Note: If this parameter is set to true, it won't hide tools. 598 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. 599 | typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false 600 | 601 | # If set to false, hide tool versions that are equal to "system". 602 | # 603 | # Note: If this parameter is set to true, it won't hide tools. 604 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. 605 | typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true 606 | 607 | # If set to non-empty value, hide tools unless there is a file matching the specified file pattern 608 | # in the current directory, or its parent directory, or its grandparent directory, and so on. 609 | # 610 | # Note: If this parameter is set to empty value, it won't hide tools. 611 | # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. 612 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. 613 | # 614 | # Example: Hide nodejs version when there is no package.json and no *.js files in the current 615 | # directory, in `..`, in `../..` and so on. 616 | # 617 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' 618 | typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= 619 | 620 | # Ruby version from asdf. 621 | typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 622 | # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' 623 | # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' 624 | 625 | # Python version from asdf. 626 | typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 627 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' 628 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' 629 | 630 | # Go version from asdf. 631 | typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 632 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 633 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 634 | 635 | # Node.js version from asdf. 636 | typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 637 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' 638 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' 639 | 640 | # Rust version from asdf. 641 | typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 642 | # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' 643 | # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' 644 | 645 | # .NET Core version from asdf. 646 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 647 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' 648 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' 649 | 650 | # Flutter version from asdf. 651 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 652 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' 653 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' 654 | 655 | # Lua version from asdf. 656 | typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 657 | # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' 658 | # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' 659 | 660 | # Java version from asdf. 661 | typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 662 | # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' 663 | # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' 664 | 665 | # Perl version from asdf. 666 | typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 667 | # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' 668 | # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' 669 | 670 | # Erlang version from asdf. 671 | typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 672 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 673 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 674 | 675 | # Elixir version from asdf. 676 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 677 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' 678 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' 679 | 680 | # Postgres version from asdf. 681 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 682 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' 683 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' 684 | 685 | # PHP version from asdf. 686 | typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 687 | # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' 688 | # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' 689 | 690 | # Haskell version from asdf. 691 | typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 692 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 693 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' 694 | 695 | # Julia version from asdf. 696 | typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 697 | # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' 698 | # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' 699 | 700 | ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### 701 | # NordVPN connection indicator color. 702 | typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 703 | # Hide NordVPN connection indicator when not connected. 704 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= 705 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= 706 | # Custom icon. 707 | # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' 708 | 709 | #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## 710 | # Ranger shell color. 711 | typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 712 | # Custom icon. 713 | # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' 714 | 715 | ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### 716 | # Nnn shell color. 717 | typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 718 | # Custom icon. 719 | # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' 720 | 721 | ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]####################### 722 | # lf shell color. 723 | typeset -g POWERLEVEL9K_LF_FOREGROUND=72 724 | # Custom icon. 725 | # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐' 726 | 727 | ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## 728 | # xplr shell color. 729 | typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72 730 | # Custom icon. 731 | # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' 732 | 733 | ###########################[ vim_shell: vim shell indicator (:sh) ]########################### 734 | # Vim shell indicator color. 735 | typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 736 | # Custom icon. 737 | # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 738 | 739 | ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### 740 | # Midnight Commander shell color. 741 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 742 | # Custom icon. 743 | # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' 744 | 745 | #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## 746 | # Nix shell color. 747 | typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 748 | 749 | # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. 750 | # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= 751 | 752 | # Custom icon. 753 | # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 754 | 755 | ##################################[ disk_usage: disk usage ]################################## 756 | # Colors for different levels of disk usage. 757 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 758 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 759 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 760 | # Thresholds for different levels of disk usage (percentage points). 761 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 762 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 763 | # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. 764 | typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false 765 | # Custom icon. 766 | # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 767 | 768 | ######################################[ ram: free RAM ]####################################### 769 | # RAM color. 770 | typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 771 | # Custom icon. 772 | # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' 773 | 774 | #####################################[ swap: used swap ]###################################### 775 | # Swap color. 776 | typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 777 | # Custom icon. 778 | # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' 779 | 780 | ######################################[ load: CPU load ]###################################### 781 | # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. 782 | typeset -g POWERLEVEL9K_LOAD_WHICH=5 783 | # Load color when load is under 50%. 784 | typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 785 | # Load color when load is between 50% and 70%. 786 | typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 787 | # Load color when load is over 70%. 788 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 789 | # Custom icon. 790 | # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' 791 | 792 | ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ 793 | # Todo color. 794 | typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 795 | # Hide todo when the total number of tasks is zero. 796 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true 797 | # Hide todo when the number of tasks after filtering is zero. 798 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false 799 | 800 | # Todo format. The following parameters are available within the expansion. 801 | # 802 | # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. 803 | # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. 804 | # 805 | # These variables correspond to the last line of the output of `todo.sh -p ls`: 806 | # 807 | # TODO: 24 of 42 tasks shown 808 | # 809 | # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. 810 | # 811 | # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' 812 | 813 | # Custom icon. 814 | # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' 815 | 816 | ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ 817 | # Timewarrior color. 818 | typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 819 | # If the tracked task is longer than 24 characters, truncate and append "…". 820 | # Tip: To always display tasks without truncation, delete the following parameter. 821 | # Tip: To hide task names and display just the icon when time tracking is enabled, set the 822 | # value of the following parameter to "". 823 | typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' 824 | 825 | # Custom icon. 826 | # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 827 | 828 | ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## 829 | # Taskwarrior color. 830 | typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 831 | 832 | # Taskwarrior segment format. The following parameters are available within the expansion. 833 | # 834 | # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. 835 | # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. 836 | # 837 | # Zero values are represented as empty parameters. 838 | # 839 | # The default format: 840 | # 841 | # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' 842 | # 843 | # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' 844 | 845 | # Custom icon. 846 | # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 847 | 848 | ################################[ cpu_arch: CPU architecture ]################################ 849 | # CPU architecture color. 850 | typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172 851 | 852 | # Hide the segment when on a specific CPU architecture. 853 | # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION= 854 | # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION= 855 | 856 | # Custom icon. 857 | # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐' 858 | 859 | ##################################[ context: user@hostname ]################################## 860 | # Context color when running with privileges. 861 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 862 | # Context color in SSH without privileges. 863 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 864 | # Default context color (no privileges, no SSH). 865 | typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 866 | 867 | # Context format when running with privileges: bold user@hostname. 868 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' 869 | # Context format when in SSH without privileges: user@hostname. 870 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' 871 | # Default context format (no privileges, no SSH): user@hostname. 872 | typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' 873 | 874 | # Don't show context unless running with privileges or in SSH. 875 | # Tip: Remove the next line to always show context. 876 | typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= 877 | 878 | # Custom icon. 879 | # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' 880 | # Custom prefix. 881 | # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' 882 | 883 | ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### 884 | # Python virtual environment color. 885 | typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 886 | # Don't show Python version next to the virtual environment name. 887 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false 888 | # If set to "false", won't show virtualenv if pyenv is already shown. 889 | # If set to "if-different", won't show virtualenv if it's the same as pyenv. 890 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false 891 | # Separate environment name from Python version only with a space. 892 | typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= 893 | # Custom icon. 894 | # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 895 | 896 | #####################[ anaconda: conda environment (https://conda.io/) ]###################### 897 | # Anaconda environment color. 898 | typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 899 | 900 | # Anaconda segment format. The following parameters are available within the expansion. 901 | # 902 | # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. 903 | # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. 904 | # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). 905 | # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). 906 | # 907 | # CONDA_PROMPT_MODIFIER can be configured with the following command: 908 | # 909 | # conda config --set env_prompt '({default_env}) ' 910 | # 911 | # The last argument is a Python format string that can use the following variables: 912 | # 913 | # - prefix The same as CONDA_PREFIX. 914 | # - default_env The same as CONDA_DEFAULT_ENV. 915 | # - name The last segment of CONDA_PREFIX. 916 | # - stacked_env Comma-separated list of names in the environment stack. The first element is 917 | # always the same as default_env. 918 | # 919 | # Note: '({default_env}) ' is the default value of env_prompt. 920 | # 921 | # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER 922 | # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former 923 | # is empty. 924 | typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' 925 | 926 | # Custom icon. 927 | # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' 928 | 929 | ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ 930 | # Pyenv color. 931 | typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 932 | # Hide python version if it doesn't come from one of these sources. 933 | typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) 934 | # If set to false, hide python version if it's the same as global: 935 | # $(pyenv version-name) == $(pyenv global). 936 | typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false 937 | # If set to false, hide python version if it's equal to "system". 938 | typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true 939 | 940 | # Pyenv segment format. The following parameters are available within the expansion. 941 | # 942 | # - P9K_CONTENT Current pyenv environment (pyenv version-name). 943 | # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). 944 | # 945 | # The default format has the following logic: 946 | # 947 | # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or 948 | # starts with "$P9K_PYENV_PYTHON_VERSION/". 949 | # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". 950 | typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' 951 | 952 | # Custom icon. 953 | # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 954 | 955 | ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ 956 | # Goenv color. 957 | typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 958 | # Hide go version if it doesn't come from one of these sources. 959 | typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) 960 | # If set to false, hide go version if it's the same as global: 961 | # $(goenv version-name) == $(goenv global). 962 | typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false 963 | # If set to false, hide go version if it's equal to "system". 964 | typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true 965 | # Custom icon. 966 | # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 967 | 968 | ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## 969 | # Nodenv color. 970 | typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 971 | # Hide node version if it doesn't come from one of these sources. 972 | typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) 973 | # If set to false, hide node version if it's the same as global: 974 | # $(nodenv version-name) == $(nodenv global). 975 | typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false 976 | # If set to false, hide node version if it's equal to "system". 977 | typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true 978 | # Custom icon. 979 | # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 980 | 981 | ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### 982 | # Nvm color. 983 | typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 984 | # Custom icon. 985 | # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 986 | 987 | ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ 988 | # Nodeenv color. 989 | typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 990 | # Don't show Node version next to the environment name. 991 | typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false 992 | # Separate environment name from Node version only with a space. 993 | typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= 994 | # Custom icon. 995 | # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 996 | 997 | ##############################[ node_version: node.js version ]############################### 998 | # Node version color. 999 | typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 1000 | # Show node version only when in a directory tree containing package.json. 1001 | typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true 1002 | # Custom icon. 1003 | # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1004 | 1005 | #######################[ go_version: go version (https://golang.org) ]######################## 1006 | # Go version color. 1007 | typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 1008 | # Show go version only when in a go project subdirectory. 1009 | typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true 1010 | # Custom icon. 1011 | # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1012 | 1013 | #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## 1014 | # Rust version color. 1015 | typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 1016 | # Show rust version only when in a rust project subdirectory. 1017 | typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true 1018 | # Custom icon. 1019 | # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1020 | 1021 | ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ 1022 | # .NET version color. 1023 | typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 1024 | # Show .NET version only when in a .NET project subdirectory. 1025 | typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true 1026 | # Custom icon. 1027 | # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1028 | 1029 | #####################[ php_version: php version (https://www.php.net/) ]###################### 1030 | # PHP version color. 1031 | typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 1032 | # Show PHP version only when in a PHP project subdirectory. 1033 | typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true 1034 | # Custom icon. 1035 | # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1036 | 1037 | ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### 1038 | # Laravel version color. 1039 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 1040 | # Custom icon. 1041 | # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1042 | 1043 | ####################[ java_version: java version (https://www.java.com/) ]#################### 1044 | # Java version color. 1045 | typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 1046 | # Show java version only when in a java project subdirectory. 1047 | typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true 1048 | # Show brief version. 1049 | typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false 1050 | # Custom icon. 1051 | # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1052 | 1053 | ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### 1054 | # Package color. 1055 | typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 1056 | # Package format. The following parameters are available within the expansion. 1057 | # 1058 | # - P9K_PACKAGE_NAME The value of `name` field in package.json. 1059 | # - P9K_PACKAGE_VERSION The value of `version` field in package.json. 1060 | # 1061 | # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' 1062 | # Custom icon. 1063 | # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1064 | 1065 | #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## 1066 | # Rbenv color. 1067 | typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 1068 | # Hide ruby version if it doesn't come from one of these sources. 1069 | typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) 1070 | # If set to false, hide ruby version if it's the same as global: 1071 | # $(rbenv version-name) == $(rbenv global). 1072 | typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false 1073 | # If set to false, hide ruby version if it's equal to "system". 1074 | typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true 1075 | # Custom icon. 1076 | # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1077 | 1078 | #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## 1079 | # Rvm color. 1080 | typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 1081 | # Don't show @gemset at the end. 1082 | typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false 1083 | # Don't show ruby- at the front. 1084 | typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false 1085 | # Custom icon. 1086 | # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1087 | 1088 | ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ 1089 | # Fvm color. 1090 | typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 1091 | # Custom icon. 1092 | # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1093 | 1094 | ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### 1095 | # Lua color. 1096 | typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 1097 | # Hide lua version if it doesn't come from one of these sources. 1098 | typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) 1099 | # If set to false, hide lua version if it's the same as global: 1100 | # $(luaenv version-name) == $(luaenv global). 1101 | typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false 1102 | # If set to false, hide lua version if it's equal to "system". 1103 | typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true 1104 | # Custom icon. 1105 | # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1106 | 1107 | ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ 1108 | # Java color. 1109 | typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 1110 | # Hide java version if it doesn't come from one of these sources. 1111 | typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) 1112 | # If set to false, hide java version if it's the same as global: 1113 | # $(jenv version-name) == $(jenv global). 1114 | typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false 1115 | # If set to false, hide java version if it's equal to "system". 1116 | typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true 1117 | # Custom icon. 1118 | # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1119 | 1120 | ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ 1121 | # Perl color. 1122 | typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 1123 | # Hide perl version if it doesn't come from one of these sources. 1124 | typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) 1125 | # If set to false, hide perl version if it's the same as global: 1126 | # $(plenv version-name) == $(plenv global). 1127 | typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false 1128 | # If set to false, hide perl version if it's equal to "system". 1129 | typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true 1130 | # Custom icon. 1131 | # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1132 | 1133 | ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############ 1134 | # Perlbrew color. 1135 | typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67 1136 | # Show perlbrew version only when in a perl project subdirectory. 1137 | typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true 1138 | # Don't show "perl-" at the front. 1139 | typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false 1140 | # Custom icon. 1141 | # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐' 1142 | 1143 | ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ 1144 | # PHP color. 1145 | typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 1146 | # Hide php version if it doesn't come from one of these sources. 1147 | typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) 1148 | # If set to false, hide php version if it's the same as global: 1149 | # $(phpenv version-name) == $(phpenv global). 1150 | typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false 1151 | # If set to false, hide php version if it's equal to "system". 1152 | typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true 1153 | # Custom icon. 1154 | # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1155 | 1156 | #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### 1157 | # Scala color. 1158 | typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 1159 | # Hide scala version if it doesn't come from one of these sources. 1160 | typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) 1161 | # If set to false, hide scala version if it's the same as global: 1162 | # $(scalaenv version-name) == $(scalaenv global). 1163 | typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false 1164 | # If set to false, hide scala version if it's equal to "system". 1165 | typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true 1166 | # Custom icon. 1167 | # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1168 | 1169 | ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### 1170 | # Haskell color. 1171 | typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 1172 | # Hide haskell version if it doesn't come from one of these sources. 1173 | # 1174 | # shell: version is set by STACK_YAML 1175 | # local: version is set by stack.yaml up the directory tree 1176 | # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) 1177 | typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) 1178 | # If set to false, hide haskell version if it's the same as in the implicit global project. 1179 | typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true 1180 | # Custom icon. 1181 | # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' 1182 | 1183 | #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# 1184 | # Show kubecontext only when the command you are typing invokes one of these tools. 1185 | # Tip: Remove the next line to always show kubecontext. 1186 | typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor' 1187 | 1188 | # Kubernetes context classes for the purpose of using different colors, icons and expansions with 1189 | # different contexts. 1190 | # 1191 | # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element 1192 | # in each pair defines a pattern against which the current kubernetes context gets matched. 1193 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1194 | # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, 1195 | # you'll see this value in your prompt. The second element of each pair in 1196 | # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The 1197 | # first match wins. 1198 | # 1199 | # For example, given these settings: 1200 | # 1201 | # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1202 | # '*prod*' PROD 1203 | # '*test*' TEST 1204 | # '*' DEFAULT) 1205 | # 1206 | # If your current kubernetes context is "deathray-testing/default", its class is TEST 1207 | # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. 1208 | # 1209 | # You can define different colors, icons and content expansions for different classes: 1210 | # 1211 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 1212 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1213 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1214 | typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1215 | # '*prod*' PROD # These values are examples that are unlikely 1216 | # '*test*' TEST # to match your needs. Customize them as needed. 1217 | '*' DEFAULT) 1218 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 1219 | # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1220 | 1221 | # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext 1222 | # segment. Parameter expansions are very flexible and fast, too. See reference: 1223 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1224 | # 1225 | # Within the expansion the following parameters are always available: 1226 | # 1227 | # - P9K_CONTENT The content that would've been displayed if there was no content 1228 | # expansion defined. 1229 | # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the 1230 | # output of `kubectl config get-contexts`. 1231 | # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the 1232 | # output of `kubectl config get-contexts`. 1233 | # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE 1234 | # in the output of `kubectl config get-contexts`. If there is no 1235 | # namespace, the parameter is set to "default". 1236 | # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the 1237 | # output of `kubectl config get-contexts`. 1238 | # 1239 | # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), 1240 | # the following extra parameters are available: 1241 | # 1242 | # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". 1243 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. 1244 | # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. 1245 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. 1246 | # 1247 | # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, 1248 | # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": 1249 | # 1250 | # - P9K_KUBECONTEXT_CLOUD_NAME=gke 1251 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account 1252 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a 1253 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1254 | # 1255 | # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": 1256 | # 1257 | # - P9K_KUBECONTEXT_CLOUD_NAME=eks 1258 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 1259 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 1260 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1261 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= 1262 | # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. 1263 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' 1264 | # Append the current context's namespace if it's not "default". 1265 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' 1266 | 1267 | # Custom prefix. 1268 | # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' 1269 | 1270 | ################[ terraform: terraform workspace (https://www.terraform.io) ]################# 1271 | # Don't show terraform workspace if it's literally "default". 1272 | typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false 1273 | # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element 1274 | # in each pair defines a pattern against which the current terraform workspace gets matched. 1275 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1276 | # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, 1277 | # you'll see this value in your prompt. The second element of each pair in 1278 | # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The 1279 | # first match wins. 1280 | # 1281 | # For example, given these settings: 1282 | # 1283 | # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1284 | # '*prod*' PROD 1285 | # '*test*' TEST 1286 | # '*' OTHER) 1287 | # 1288 | # If your current terraform workspace is "project_test", its class is TEST because "project_test" 1289 | # doesn't match the pattern '*prod*' but does match '*test*'. 1290 | # 1291 | # You can define different colors, icons and content expansions for different classes: 1292 | # 1293 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 1294 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1295 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1296 | typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1297 | # '*prod*' PROD # These values are examples that are unlikely 1298 | # '*test*' TEST # to match your needs. Customize them as needed. 1299 | '*' OTHER) 1300 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 1301 | # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' 1302 | 1303 | #############[ terraform_version: terraform version (https://www.terraform.io) ]############## 1304 | # Terraform version color. 1305 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38 1306 | # Custom icon. 1307 | # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1308 | 1309 | #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# 1310 | # Show aws only when the command you are typing invokes one of these tools. 1311 | # Tip: Remove the next line to always show aws. 1312 | typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' 1313 | 1314 | # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element 1315 | # in each pair defines a pattern against which the current AWS profile gets matched. 1316 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1317 | # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, 1318 | # you'll see this value in your prompt. The second element of each pair in 1319 | # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The 1320 | # first match wins. 1321 | # 1322 | # For example, given these settings: 1323 | # 1324 | # typeset -g POWERLEVEL9K_AWS_CLASSES=( 1325 | # '*prod*' PROD 1326 | # '*test*' TEST 1327 | # '*' DEFAULT) 1328 | # 1329 | # If your current AWS profile is "company_test", its class is TEST 1330 | # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. 1331 | # 1332 | # You can define different colors, icons and content expansions for different classes: 1333 | # 1334 | # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 1335 | # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1336 | # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1337 | typeset -g POWERLEVEL9K_AWS_CLASSES=( 1338 | # '*prod*' PROD # These values are examples that are unlikely 1339 | # '*test*' TEST # to match your needs. Customize them as needed. 1340 | '*' DEFAULT) 1341 | typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 1342 | # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1343 | 1344 | # AWS segment format. The following parameters are available within the expansion. 1345 | # 1346 | # - P9K_AWS_PROFILE The name of the current AWS profile. 1347 | # - P9K_AWS_REGION The region associated with the current AWS profile. 1348 | typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' 1349 | 1350 | #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# 1351 | # AWS Elastic Beanstalk environment color. 1352 | typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 1353 | # Custom icon. 1354 | # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1355 | 1356 | ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## 1357 | # Show azure only when the command you are typing invokes one of these tools. 1358 | # Tip: Remove the next line to always show azure. 1359 | typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 1360 | # Azure account name color. 1361 | typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 1362 | # Custom icon. 1363 | # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1364 | 1365 | ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### 1366 | # Show gcloud only when the command you are typing invokes one of these tools. 1367 | # Tip: Remove the next line to always show gcloud. 1368 | typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil' 1369 | # Google cloud color. 1370 | typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 1371 | 1372 | # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or 1373 | # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative 1374 | # enough. You can use the following parameters in the expansions. Each of them corresponds to the 1375 | # output of `gcloud` tool. 1376 | # 1377 | # Parameter | Source 1378 | # -------------------------|-------------------------------------------------------------------- 1379 | # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' 1380 | # P9K_GCLOUD_ACCOUNT | gcloud config get-value account 1381 | # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project 1382 | # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' 1383 | # 1384 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. 1385 | # 1386 | # Obtaining project name requires sending a request to Google servers. This can take a long time 1387 | # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud 1388 | # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets 1389 | # set and gcloud prompt segment transitions to state COMPLETE. 1390 | # 1391 | # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL 1392 | # and COMPLETE. You can also hide gcloud in state PARTIAL by setting 1393 | # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and 1394 | # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. 1395 | typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' 1396 | typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' 1397 | 1398 | # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name 1399 | # this often. Negative value disables periodic polling. In this mode project name is retrieved 1400 | # only when the current configuration, account or project id changes. 1401 | typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 1402 | 1403 | # Custom icon. 1404 | # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' 1405 | 1406 | #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# 1407 | # Show google_app_cred only when the command you are typing invokes one of these tools. 1408 | # Tip: Remove the next line to always show google_app_cred. 1409 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' 1410 | 1411 | # Google application credentials classes for the purpose of using different colors, icons and 1412 | # expansions with different credentials. 1413 | # 1414 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first 1415 | # element in each pair defines a pattern against which the current kubernetes context gets 1416 | # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion 1417 | # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION 1418 | # parameters, you'll see this value in your prompt. The second element of each pair in 1419 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. 1420 | # The first match wins. 1421 | # 1422 | # For example, given these settings: 1423 | # 1424 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1425 | # '*:*prod*:*' PROD 1426 | # '*:*test*:*' TEST 1427 | # '*' DEFAULT) 1428 | # 1429 | # If your current Google application credentials is "service_account deathray-testing x@y.com", 1430 | # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. 1431 | # 1432 | # You can define different colors, icons and content expansions for different classes: 1433 | # 1434 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 1435 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1436 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' 1437 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1438 | # '*:*prod*:*' PROD # These values are examples that are unlikely 1439 | # '*:*test*:*' TEST # to match your needs. Customize them as needed. 1440 | '*' DEFAULT) 1441 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 1442 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1443 | 1444 | # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by 1445 | # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: 1446 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1447 | # 1448 | # You can use the following parameters in the expansion. Each of them corresponds to one of the 1449 | # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. 1450 | # 1451 | # Parameter | JSON key file field 1452 | # ---------------------------------+--------------- 1453 | # P9K_GOOGLE_APP_CRED_TYPE | type 1454 | # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id 1455 | # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email 1456 | # 1457 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. 1458 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' 1459 | 1460 | ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]############### 1461 | # Toolbox color. 1462 | typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178 1463 | # Don't display the name of the toolbox if it matches fedora-toolbox-*. 1464 | typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}' 1465 | # Custom icon. 1466 | # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' 1467 | # Custom prefix. 1468 | # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin ' 1469 | 1470 | ###############################[ public_ip: public IP address ]############################### 1471 | # Public IP color. 1472 | typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 1473 | # Custom icon. 1474 | # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1475 | 1476 | ########################[ vpn_ip: virtual private network indicator ]######################### 1477 | # VPN IP color. 1478 | typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 1479 | # When on VPN, show just an icon without the IP address. 1480 | # Tip: To display the private IP address when on VPN, remove the next line. 1481 | typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= 1482 | # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN 1483 | # to see the name of the interface. 1484 | typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)' 1485 | # If set to true, show one segment per matching network interface. If set to false, show only 1486 | # one segment corresponding to the first matching network interface. 1487 | # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. 1488 | typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false 1489 | # Custom icon. 1490 | # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1491 | 1492 | ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### 1493 | # IP color. 1494 | typeset -g POWERLEVEL9K_IP_FOREGROUND=38 1495 | # The following parameters are accessible within the expansion: 1496 | # 1497 | # Parameter | Meaning 1498 | # ----------------------+------------------------------------------- 1499 | # P9K_IP_IP | IP address 1500 | # P9K_IP_INTERFACE | network interface 1501 | # P9K_IP_RX_BYTES | total number of bytes received 1502 | # P9K_IP_TX_BYTES | total number of bytes sent 1503 | # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt 1504 | # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt 1505 | # P9K_IP_RX_RATE | receive rate (since last prompt) 1506 | # P9K_IP_TX_RATE | send rate (since last prompt) 1507 | typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}' 1508 | # Show information for the first network interface whose name matches this regular expression. 1509 | # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. 1510 | typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' 1511 | # Custom icon. 1512 | # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1513 | 1514 | #########################[ proxy: system-wide http/https/ftp proxy ]########################## 1515 | # Proxy color. 1516 | typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 1517 | # Custom icon. 1518 | # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' 1519 | 1520 | ################################[ battery: internal battery ]################################# 1521 | # Show battery in red when it's below this level and not connected to power supply. 1522 | typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 1523 | typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 1524 | # Show battery in green when it's charging or fully charged. 1525 | typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 1526 | # Show battery in yellow when it's discharging. 1527 | typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 1528 | # Battery pictograms going from low to high level of charge. 1529 | typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' 1530 | # Don't show the remaining time to charge/discharge. 1531 | typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false 1532 | 1533 | #####################################[ wifi: wifi speed ]##################################### 1534 | # WiFi color. 1535 | typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 1536 | # Custom icon. 1537 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' 1538 | 1539 | # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). 1540 | # 1541 | # # Wifi colors and icons for different signal strength levels (low to high). 1542 | # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values 1543 | # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values 1544 | # 1545 | # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' 1546 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' 1547 | # 1548 | # The following parameters are accessible within the expansions: 1549 | # 1550 | # Parameter | Meaning 1551 | # ----------------------+--------------- 1552 | # P9K_WIFI_SSID | service set identifier, a.k.a. network name 1553 | # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown 1554 | # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second 1555 | # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 1556 | # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 1557 | # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) 1558 | 1559 | ####################################[ time: current time ]#################################### 1560 | # Current time color. 1561 | typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 1562 | # Format for the current time: 09:51:02. See `man 3 strftime`. 1563 | typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' 1564 | # If set to true, time will update when you hit enter. This way prompts for the past 1565 | # commands will contain the start times of their commands as opposed to the default 1566 | # behavior where they contain the end times of their preceding commands. 1567 | typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false 1568 | # Custom icon. 1569 | typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= 1570 | # Custom prefix. 1571 | # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' 1572 | 1573 | # Example of a user-defined prompt segment. Function prompt_example will be called on every 1574 | # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or 1575 | # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. 1576 | # 1577 | # Type `p10k help segment` for documentation and a more sophisticated example. 1578 | function prompt_example() { 1579 | p10k segment -f 208 -i '⭐' -t 'hello, %n' 1580 | } 1581 | 1582 | # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job 1583 | # is to generate the prompt segment for display in instant prompt. See 1584 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1585 | # 1586 | # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function 1587 | # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k 1588 | # will replay these calls without actually calling instant_prompt_*. It is imperative that 1589 | # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this 1590 | # rule is not observed, the content of instant prompt will be incorrect. 1591 | # 1592 | # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If 1593 | # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. 1594 | function instant_prompt_example() { 1595 | # Since prompt_example always makes the same `p10k segment` calls, we can call it from 1596 | # instant_prompt_example. This will give us the same `example` prompt segment in the instant 1597 | # and regular prompts. 1598 | prompt_example 1599 | } 1600 | 1601 | # User-defined prompt segments can be customized the same way as built-in segments. 1602 | # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 1603 | # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1604 | 1605 | # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt 1606 | # when accepting a command line. Supported values: 1607 | # 1608 | # - off: Don't change prompt when accepting a command line. 1609 | # - always: Trim down prompt when accepting a command line. 1610 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command 1611 | # typed after changing current working directory. 1612 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off 1613 | 1614 | # Instant prompt mode. 1615 | # 1616 | # - off: Disable instant prompt. Choose this if you've tried instant prompt and found 1617 | # it incompatible with your zsh configuration files. 1618 | # - quiet: Enable instant prompt and don't print warnings when detecting console output 1619 | # during zsh initialization. Choose this if you've read and understood 1620 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1621 | # - verbose: Enable instant prompt and print a warning when detecting console output during 1622 | # zsh initialization. Choose this if you've never tried instant prompt, haven't 1623 | # seen the warning, or if you are unsure what this all means. 1624 | typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose 1625 | 1626 | # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. 1627 | # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload 1628 | # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you 1629 | # really need it. 1630 | typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true 1631 | 1632 | # If p10k is already loaded, reload configuration. 1633 | # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. 1634 | (( ! $+functions[p10k] )) || p10k reload 1635 | } 1636 | 1637 | # Tell `p10k configure` which file it should overwrite. 1638 | typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} 1639 | 1640 | (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} 1641 | 'builtin' 'unset' 'p10k_config_opts' 1642 | -------------------------------------------------------------------------------- /dotfiles/psqlrc: -------------------------------------------------------------------------------- 1 | -- Automatically format output based on result length and screen 2 | \x auto 3 | 4 | -- Prettier nulls 5 | \pset null '#' 6 | 7 | -- Save history based on database name 8 | \set HISTFILE ~/.psql_history- :DBNAME 9 | 10 | -- Turn on automatic query timing 11 | \timing 12 | 13 | \set PROMPT1 '-- %M:%> %n@%/%R%#%x ' 14 | \set PROMPT2 '--> ' 15 | 16 | -------------------------------------------------------------------------------- /dotfiles/starship.toml: -------------------------------------------------------------------------------- 1 | # Get editor completions based on the config schema 2 | "$schema" = 'https://starship.rs/config-schema.json' 3 | 4 | # Inserts a blank line between shell prompts 5 | add_newline = true 6 | 7 | # Replace the '❯' symbol in the prompt with '➜' 8 | [character] # The name of the module we are configuring is 'character' 9 | success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green' 10 | 11 | [aws] 12 | symbol = " " 13 | 14 | [buf] 15 | symbol = " " 16 | 17 | [bun] 18 | symbol = " " 19 | 20 | [c] 21 | symbol = " " 22 | 23 | [cpp] 24 | symbol = " " 25 | 26 | [cmake] 27 | symbol = " " 28 | 29 | [conda] 30 | symbol = " " 31 | 32 | [crystal] 33 | symbol = " " 34 | 35 | [dart] 36 | symbol = " " 37 | 38 | [deno] 39 | symbol = " " 40 | 41 | [directory] 42 | read_only = " 󰌾" 43 | 44 | [docker_context] 45 | symbol = " " 46 | 47 | [elixir] 48 | symbol = " " 49 | 50 | [elm] 51 | symbol = " " 52 | 53 | [fennel] 54 | symbol = " " 55 | 56 | [fossil_branch] 57 | symbol = " " 58 | 59 | [gcloud] 60 | symbol = " " 61 | 62 | [git_branch] 63 | symbol = " " 64 | 65 | [git_commit] 66 | tag_symbol = '  ' 67 | 68 | [golang] 69 | symbol = " " 70 | 71 | [guix_shell] 72 | symbol = " " 73 | 74 | [haskell] 75 | symbol = " " 76 | 77 | [haxe] 78 | symbol = " " 79 | 80 | [hg_branch] 81 | symbol = " " 82 | 83 | [hostname] 84 | ssh_symbol = " " 85 | 86 | [java] 87 | symbol = " " 88 | 89 | [julia] 90 | symbol = " " 91 | 92 | [kotlin] 93 | symbol = " " 94 | 95 | [lua] 96 | symbol = " " 97 | 98 | [memory_usage] 99 | symbol = "󰍛 " 100 | 101 | [meson] 102 | symbol = "󰔷 " 103 | 104 | [nim] 105 | symbol = "󰆥 " 106 | 107 | [nix_shell] 108 | symbol = " " 109 | 110 | [nodejs] 111 | symbol = " " 112 | 113 | [ocaml] 114 | symbol = " " 115 | 116 | [os.symbols] 117 | Alpaquita = " " 118 | Alpine = " " 119 | AlmaLinux = " " 120 | Amazon = " " 121 | Android = " " 122 | Arch = " " 123 | Artix = " " 124 | CachyOS = " " 125 | CentOS = " " 126 | Debian = " " 127 | DragonFly = " " 128 | Emscripten = " " 129 | EndeavourOS = " " 130 | Fedora = " " 131 | FreeBSD = " " 132 | Garuda = "󰛓 " 133 | Gentoo = " " 134 | HardenedBSD = "󰞌 " 135 | Illumos = "󰈸 " 136 | Kali = " " 137 | Linux = " " 138 | Mabox = " " 139 | Macos = " " 140 | Manjaro = " " 141 | Mariner = " " 142 | MidnightBSD = " " 143 | Mint = " " 144 | NetBSD = " " 145 | NixOS = " " 146 | Nobara = " " 147 | OpenBSD = "󰈺 " 148 | openSUSE = " " 149 | OracleLinux = "󰌷 " 150 | Pop = " " 151 | Raspbian = " " 152 | Redhat = " " 153 | RedHatEnterprise = " " 154 | RockyLinux = " " 155 | Redox = "󰀘 " 156 | Solus = "󰠳 " 157 | SUSE = " " 158 | Ubuntu = " " 159 | Unknown = " " 160 | Void = " " 161 | Windows = "󰍲 " 162 | 163 | [package] 164 | symbol = "󰏗 " 165 | 166 | [perl] 167 | symbol = " " 168 | 169 | [php] 170 | symbol = " " 171 | 172 | [pijul_channel] 173 | symbol = " " 174 | 175 | [pixi] 176 | symbol = "󰏗 " 177 | 178 | [python] 179 | symbol = " " 180 | 181 | [rlang] 182 | symbol = "󰟔 " 183 | 184 | [ruby] 185 | symbol = " " 186 | 187 | [rust] 188 | symbol = "󱘗 " 189 | 190 | [scala] 191 | symbol = " " 192 | 193 | [swift] 194 | symbol = " " 195 | 196 | [zig] 197 | symbol = " " 198 | 199 | [gradle] 200 | symbol = " " 201 | -------------------------------------------------------------------------------- /dotfiles/tmux.conf: -------------------------------------------------------------------------------- 1 | # split panes using | and - 2 | bind | split-window -h 3 | bind - split-window -v 4 | unbind '"' 5 | unbind % 6 | 7 | # Toggle sync panes 8 | bind C-x setw synchronize-panes 9 | 10 | # reload config file (change file location to your the tmux.conf you want to use) 11 | bind r source-file ~/.tmux.conf \; display "Reloaded!" 12 | 13 | # Switch pages with C-b - the -r allows for repeat of quickly 14 | bind -r h select-pane -L 15 | bind -r j select-pane -D 16 | bind -r k select-pane -U 17 | bind -r l select-pane -R 18 | 19 | # Resize pane - the -r allows for repeat of quickly 20 | bind -r C-h resize-pane -L 5 21 | bind -r C-j resize-pane -D 5 22 | bind -r C-k resize-pane -U 5 23 | bind -r C-l resize-pane -R 5 24 | 25 | # close all other panes 26 | bind o kill-pane -a 27 | 28 | # don't rename windows automatically 29 | set-option -g allow-rename off 30 | 31 | # better navigation in copy mode 32 | set-window-option -g mode-keys vi 33 | 34 | # big scrollback buffer 35 | set-option -g history-limit 10000 36 | 37 | # Icons in nnn 38 | set -g default-terminal "screen-256color" 39 | 40 | # Enter copy mode with A-up 41 | bind -n M-Up copy-mode 42 | 43 | # Scroll up/down by 1 line, half screen, whole screen 44 | bind -T copy-mode-vi M-Up send-keys -X scroll-up 45 | bind -T copy-mode-vi M-Down send-keys -X scroll-down 46 | bind -T copy-mode-vi M-PageUp send-keys -X halfpage-up 47 | bind -T copy-mode-vi M-PageDown send-keys -X halfpage-down 48 | bind -T copy-mode-vi PageDown send-keys -X page-down 49 | bind -T copy-mode-vi PageUp send-keys -X page-up 50 | 51 | # Enable mouse control 52 | set -g mouse on 53 | bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 1 scroll-up 54 | bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 1 scroll-down 55 | 56 | # Vim like select / copy / paste keybindings 57 | bind-key -T copy-mode-vi v send -X begin-selection # default is 58 | bind-key -T copy-mode-vi V send -X select-line 59 | bind-key -T copy-mode-vi C-v send -X rectangle-toggle # default is C-v, or R in copy-mode (non-vi) 60 | bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -selection clipboard -in' 61 | bind p paste-buffer # default ] 62 | 63 | # Selecting text will copy and exit scrollback mode, use M-click to copy in iterm 64 | 65 | # Review recent copy buffers for pasting 66 | bind C-p choose-buffer 67 | 68 | set -g status-position top 69 | 70 | # Colours from solarized_light 71 | colour_base3="colour234" 72 | colour_base2="colour235" 73 | colour_base1="colour240" 74 | colour_base0="colour241" 75 | colour_base00="colour244" 76 | colour_base01="colour245" 77 | colour_base02="colour254" 78 | colour_base03="colour230" 79 | colour_yellow="colour136" 80 | colour_orange="colour166" 81 | colour_red="colour160" 82 | colour_magenta="colour125" 83 | colour_violeta="colour61" 84 | colour_blue="colour4" 85 | #colour_blue="colour33" 86 | colour_cyan="colour37" 87 | colour_green="colour2" 88 | #colour_green="colour64" 89 | 90 | # Colour scheme from lualine solarized_light 91 | # (outer) e.g. NORMAL> = fg base03, bg blue, bold 92 | # (inner) e.g. branch name> = fg base03, bg base1 93 | # (middle) whole bar = fg base1, bg base02 94 | # INSERT mode - change outer only, bg green 95 | # VISUAL mode - change outer only, bg magenta 96 | # REPLACE mode - change outer only, bg red 97 | # inactive: 98 | # (outer) fg base0 bg base02 99 | # (middle) fg base03 base00 100 | # (inner) fg base01, base02 101 | 102 | # Generated using https://github.com/edkolev/tmuxline.vim :TmuxlineSnapshot 103 | set -g status-justify "left" 104 | set -g status "on" 105 | set -g status-left-style "none" 106 | set -g message-command-style "fg=$colour_base1,bg=$colour_base02" 107 | set -g status-right-style "none" 108 | set -g pane-active-border-style "fg=$colour_green" 109 | set -g status-style "none,bg=$colour_base02" 110 | set -g message-style "fg=$colour_base1,bg=$colour_base02" 111 | set -g pane-border-style "fg=$colour_base1" 112 | set -g status-right-length "100" 113 | set -g status-left-length "100" 114 | setw -g window-status-activity-style "none" 115 | setw -g window-status-separator "" 116 | setw -g window-status-style "none,fg=$colour_base1,bg=$colour_base02" 117 | set -g status-left "#[fg=$colour_base03,bg=$colour_blue,bold] #S #[fg=$colour_blue,bg=$colour_base1,nobold,nounderscore,noitalics]" 118 | set -g status-right "#[fg=$colour_base1,bg=$colour_base02,nobold,nounderscore,noitalics]#[fg=$colour_base03,bg=$colour_base1] %Y-%m-%d  %H:%M #[fg=$colour_blue,bg=$colour_base1,nobold,nounderscore,noitalics]#[fg=$colour_base03,bg=$colour_blue] #h " 119 | setw -g window-status-format "#[fg=$colour_base03,bg=$colour_base1] #I  #W " 120 | setw -g window-status-current-format "#[fg=$colour_base03,bg=$colour_base1] #I  #W #[fg=$colour_base1,bg=$colour_base02,nobold,nounderscore,noitalics]" 121 | 122 | # Handle remote nested tmux sessions 123 | if-shell 'test -n "$SSH_CLIENT"' 'source-file ~/.tmux.remote.conf' 124 | bind -T root F12 \ 125 | set prefix None \;\ 126 | set key-table off \;\ 127 | set -g status-left "#[fg=$colour_base0,bg=$colour_base02,bold] #S #[fg=$colour_base02,bg=$colour_base1,nobold,nounderscore,noitalics]" \;\ 128 | set -g status-right "#[fg=$colour_base1,bg=$colour_base02,nobold,nounderscore,noitalics]#[fg=$colour_base03,bg=$colour_base1] %Y-%m-%d  %H:%M #[fg=$colour_base02,bg=$colour_base1,nobold,nounderscore,noitalics]#[fg=$colour_base0,bg=$colour_base02] #h #([ $(tmux show-option -qv key-table) = 'off' ] && echo '🔒') " \;\ 129 | if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ 130 | refresh-client -S \;\ 131 | 132 | bind -T off F12 \ 133 | set -u prefix \;\ 134 | set -u key-table \;\ 135 | set -g status-left "#[fg=$colour_base03,bg=$colour_blue,bold] #S #[fg=$colour_blue,bg=$colour_base1,nobold,nounderscore,noitalics]" \;\ 136 | set -g status-right "#[fg=$colour_base1,bg=$colour_base02,nobold,nounderscore,noitalics]#[fg=$colour_base03,bg=$colour_base1] %Y-%m-%d  %H:%M #[fg=$colour_blue,bg=$colour_base1,nobold,nounderscore,noitalics]#[fg=$colour_base03,bg=$colour_blue] #h " \;\ 137 | refresh-client -S 138 | 139 | -------------------------------------------------------------------------------- /dotfiles/tmux.remote.conf: -------------------------------------------------------------------------------- 1 | set -g status-position bottom 2 | 3 | -------------------------------------------------------------------------------- /dotfiles/vscode-keybindings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": "ctrl+cmd+v", 4 | "command": "toggleVim" 5 | }, 6 | { 7 | "key": "ctrl+shift+c", 8 | "command": "editor.action.clipboardCopyAction" 9 | }, 10 | { 11 | "key": "ctrl+shift+v", 12 | "command": "editor.action.clipboardPasteAction" 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /dotfiles/vscode-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, 3 | "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, 4 | "[python]": { 5 | "editor.codeActionsOnSave": { 6 | "source.fixAll": "explicit", 7 | "source.organizeImports": "explicit" 8 | }, 9 | "editor.defaultFormatter": "charliermarsh.ruff", 10 | "editor.formatOnSave": true 11 | }, 12 | "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, 13 | "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, 14 | "editor.fontFamily": "JetBrainsMono Nerd Font", 15 | "editor.fontLigatures": true, 16 | "editor.fontSize": 14, 17 | "editor.inlineSuggest.enabled": true, 18 | "editor.inlineSuggest.suppressSuggestions": true, 19 | "editor.quickSuggestions": { "strings": "on" }, 20 | "editor.rulers": [80, 120], 21 | "explorer.confirmDelete": false, 22 | "files.associations": { "*.css": "tailwindcss" }, 23 | "files.autoSave": "afterDelay", 24 | "git.autofetch": true, 25 | "git.blame.editorDecoration.enabled": true, 26 | "git.blame.editorDecoration.template": "${authorName} (${authorDateAgo}) ${subject}", 27 | "github.copilot.enable": { 28 | "*": true, 29 | "yaml": false 30 | }, 31 | "lldb.suppressUpdateNotifications": true, 32 | "notebook.codeActionsOnSave": { 33 | "notebook.source.fixAll": "explicit", 34 | "notebook.source.organizeImports": "explicit" 35 | }, 36 | "notebook.formatOnSave.enabled": true, 37 | "python.analysis.languageServerMode": "full", 38 | "python.analysis.typeCheckingMode": "strict", 39 | "python.defaultInterpreterPath": "/opt/homebrew/bin/python3.12", 40 | "python.languageServer": "Pylance", 41 | "redhat.telemetry.enabled": false, 42 | "security.workspace.trust.untrustedFiles": "open", 43 | "terminal.integrated.fontFamily": "JetBrainsMono Nerd Font Mono", 44 | "terminal.integrated.fontSize": 14, 45 | "vim.enableNeovim": true, 46 | // "vim.insertModeKeyBindings": [{ "before": ["j", "k"], "after": [""] }], 47 | "vim.leader": "", 48 | "vim.smartRelativeLine": true, 49 | "vim.sneak": true, 50 | "vim.statusBarColorControl": true, 51 | "vim.useSystemClipboard": false, 52 | "vsicons.dontShowNewVersionMessage": true, 53 | "window.autoDetectColorScheme": true, 54 | "window.restoreWindows": "none", 55 | "workbench.iconTheme": "vscode-icons", 56 | "workbench.preferredDarkColorTheme": "Solarized Dark", 57 | "workbench.preferredLightColorTheme": "Solarized Light", 58 | "workbench.sideBar.location": "right", 59 | "workbench.startupEditor": "none", 60 | "workbench.colorCustomizations": { 61 | "statusBar.background": "#005f87", 62 | "statusBar.noFolderBackground": "#005f87", 63 | "statusBar.debuggingBackground": "#005f87", 64 | "statusBar.foreground": "#ffffff", 65 | "statusBar.debuggingForeground": "#ffffff" 66 | }, 67 | } 68 | 69 | -------------------------------------------------------------------------------- /dotfiles/vscode.extensions: -------------------------------------------------------------------------------- 1 | anthropic.claude-code 2 | bradlc.vscode-tailwindcss 3 | charliermarsh.ruff 4 | dbaeumer.vscode-eslint 5 | esbenp.prettier-vscode 6 | fill-labs.dependi 7 | github.copilot 8 | github.copilot-chat 9 | ms-azuretools.vscode-containers 10 | ms-azuretools.vscode-docker 11 | ms-python.debugpy 12 | ms-python.mypy-type-checker 13 | ms-python.python 14 | ms-python.vscode-pylance 15 | ms-toolsai.jupyter 16 | ms-toolsai.jupyter-keymap 17 | ms-toolsai.jupyter-renderers 18 | ms-toolsai.vscode-jupyter-cell-tags 19 | ms-toolsai.vscode-jupyter-slideshow 20 | ms-vscode-remote.remote-containers 21 | redhat.vscode-yaml 22 | rust-lang.rust-analyzer 23 | sonarsource.sonarlint-vscode 24 | sourcegraph.sourcegraph 25 | tamasfe.even-better-toml 26 | usernamehw.errorlens 27 | vadimcn.vscode-lldb 28 | vscode-icons-team.vscode-icons 29 | vscodevim.vim 30 | -------------------------------------------------------------------------------- /dotfiles/zed-rules/llms-directory.txt: -------------------------------------------------------------------------------- 1 | Read the latest documentation for the frameworks and libraries you're using by finding the correct llms.txt link on either the https://llmstxt.site or https://directory.llmstxt.cloud websites 2 | 3 | 4 | -------------------------------------------------------------------------------- /dotfiles/zed-settings.json: -------------------------------------------------------------------------------- 1 | // Zed settings 2 | // 3 | // For information on how to configure Zed, see the Zed 4 | // documentation: https://zed.dev/docs/configuring-zed 5 | // 6 | // To see all of Zed's default settings without changing your 7 | // custom settings, run `zed: open default settings` from the 8 | // command palette (cmd-shift-p / ctrl-shift-p) 9 | { 10 | "edit_predictions": { 11 | "mode": "eager", 12 | "copilot": { 13 | "proxy": null, 14 | "proxy_no_verify": null 15 | }, 16 | "enabled_in_text_threads": false 17 | }, 18 | "agent": { 19 | "inline_assistant_model": { 20 | "provider": "zed.dev", 21 | "model": "claude-sonnet-4-latest" 22 | }, 23 | "default_model": { 24 | "provider": "zed.dev", 25 | "model": "claude-sonnet-4-thinking-latest" 26 | }, 27 | "default_profile": "write", 28 | "model_parameters": [], 29 | "always_allow_tool_actions": true, 30 | "version": "2" 31 | }, 32 | "autosave": "on_focus_change", 33 | "vim_mode": true, 34 | "base_keymap": "VSCode", 35 | "buffer_font_family": "JetBrainsMono Nerd Font", 36 | "buffer_font_features": { 37 | "calt": true, 38 | "liga": true 39 | }, 40 | "buffer_font_size": 14, 41 | "languages": { 42 | "Python": { 43 | "language_servers": ["pyright", "ruff"], 44 | "format_on_save": "on", 45 | "formatter": [ 46 | { 47 | "code_actions": { 48 | "source.organizeImports.ruff": true, 49 | "source.fixAll.ruff": true 50 | } 51 | }, 52 | { 53 | "language_server": { 54 | "name": "ruff" 55 | } 56 | } 57 | ] 58 | } 59 | }, 60 | "tabs": { 61 | "show_close_button": "hidden" 62 | }, 63 | "wrap_guides": [80, 120], 64 | "terminal": { 65 | "font_size": 14, 66 | "font_family": "JetBrainsMono Nerd Font Mono" 67 | }, 68 | "theme": { 69 | "mode": "system", 70 | "light": "One Dark", 71 | "dark": "One Dark" 72 | }, 73 | "ui_font_family": "JetBrainsMono Nerd Font Mono", 74 | "ui_font_size": 18, 75 | "ui_font_weight": 300 76 | } 77 | -------------------------------------------------------------------------------- /dotfiles/zshrc: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # PLATFORM AGNOSTIC CONFIG INIT 3 | ################################################################################ 4 | # vi:sw=2:ts=2:et 5 | 6 | 7 | # Basic Common Paths Setup ##################################################### 8 | 9 | # TODO: this should probably live in zshenv 10 | PATH=/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin 11 | 12 | PSQL_PATH="" 13 | 14 | if [[ -d /opt/homebrew/bin ]]; then 15 | PATH=/opt/homebrew/bin:$PATH 16 | fi 17 | 18 | if [[ -e $HOME/.cargo/env ]]; then 19 | source $HOME/.cargo/env 20 | fi 21 | 22 | if [[ -d /usr/local/go/bin ]]; then 23 | PATH=/usr/local/go/bin:$PATH 24 | fi 25 | 26 | if [[ -d $HOME/go/bin ]]; then 27 | PATH=$HOME/go/bin:$PATH 28 | fi 29 | 30 | # Zig 31 | if [ -d $HOME/zig ]; then 32 | export PATH=$HOME/zig:$PATH 33 | fi 34 | 35 | # Intellij 36 | if [ -d $HOME/Library/Application\ Support/JetBrains/Toolbox/scripts ]; then 37 | export PATH=$HOME/Library/Application\ Support/JetBrains/Toolbox/scripts:$PATH 38 | fi 39 | 40 | if [ -d $HOME/.bun ]; then 41 | # bun completions 42 | [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun" 43 | 44 | export BUN_INSTALL="$HOME/.bun" 45 | export PATH="$BUN_INSTALL/bin:$PATH" 46 | fi 47 | 48 | if [[ -d $HOME/.dotnet/tools ]]; then 49 | PATH=$HOME/.dotnet/tools:$PATH 50 | fi 51 | 52 | export PATH=$HOME/bin:$HOME/.local/bin:$PATH 53 | 54 | zstyle ":completion:*" rehash true 55 | zstyle :compinstall filename $HOME/.zshrc 56 | autoload -Uz compinit 57 | compinit 58 | 59 | 60 | # History ###################################################################### 61 | 62 | HISTFILE=~/.histfile 63 | HISTSIZE=1000 64 | SAVEHIST=10000 65 | setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. 66 | setopt SHARE_HISTORY # Share history between all sessions. 67 | setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history. 68 | setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again. 69 | setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate. 70 | setopt HIST_FIND_NO_DUPS # Do not display a line previously found. 71 | setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space. 72 | setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file. 73 | setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry. 74 | setopt HIST_VERIFY # Don't execute immediately upon history expansion. 75 | 76 | 77 | # Shell Behaviours ############################################################# 78 | 79 | setopt autocd notify 80 | 81 | # vi mode keybindings 82 | bindkey -v 83 | 84 | # Emacs/readline & vi style history searching 85 | bindkey ^R history-incremental-search-backward 86 | bindkey -M vicmd '?' history-incremental-search-backward 87 | bindkey -M vicmd '/' history-incremental-search-forward 88 | 89 | # Beginning search with arrow keys 90 | autoload -U up-line-or-beginning-search 91 | zle -N down-line-or-beginning-search 92 | autoload -U down-line-or-beginning-search 93 | zle -N up-line-or-beginning-search 94 | bindkey "^[[A" up-line-or-beginning-search 95 | bindkey "^[[B" down-line-or-beginning-search 96 | bindkey -M vicmd "k" up-line-or-beginning-search 97 | bindkey -M vicmd "j" down-line-or-beginning-search 98 | 99 | # Years ago i started using ctrl+A / ctrl+x in vi, this is frequently useful 100 | autoload -U incarg 101 | zle -N incarg 102 | bindkey -M viins '^A' incarg 103 | bindkey -M vicmd '^A' incarg 104 | decarg() { 105 | local incarg=-1 106 | incarg 107 | } 108 | zle -N decarg 109 | bindkey -M viins '^X' decarg 110 | bindkey -M vicmd '^X' decarg 111 | 112 | # When v mode isn't enough, edit cmdline in vim 113 | bindkey -M vicmd "^V" edit-command-line 114 | 115 | # Pause 10ms (minimum) before entering cmd mode 116 | export KEYTIMEOUT=1 117 | 118 | # Escape takes wayyyy too long to process in some terminals, ctrl+[ is a chord and i'm a vim user, so... 119 | bindkey -M viins 'jk' vi-cmd-mode 120 | 121 | # Setup fzf integration 122 | export FZF_DEFAULT_COMMAND="fd --type f" 123 | 124 | # Setup further completions 125 | export FPATH=~/.local/share/zsh/site-functions:$FPATH 126 | 127 | # Handy shortcut for logging into multiple hosts in screen panes 128 | if [[ -n $TMUX_PANE ]]; then 129 | (( HP = ${TMUX_PANE/\%/} + 2 )) 130 | alias sshdx="ssh s${HP}.home.craigjperry.com" 131 | fi 132 | 133 | 134 | # Python tools ################################################################# 135 | 136 | alias senv="source venv/bin/activate" 137 | alias denv="deactivate" 138 | alias cenv="python3 -m venv venv && senv && python -m pip install -U pip" 139 | 140 | if [ -e ~/.rye/env ]; then 141 | source ~/.rye/env 142 | fi 143 | 144 | 145 | # Golang tools ################################################################# 146 | if [ -d ~/go ]; then 147 | alias watch=viddy 148 | #alias df=duf 149 | fi 150 | 151 | viddy () { 152 | if [ ! -e ~/go/bin/viddy ]; then 153 | go install github.com/sachaos/viddy@latest 154 | fi 155 | unset -f viddy 156 | viddy "$@" 157 | } 158 | 159 | duf () { 160 | if [ ! -e ~/go/bin/duf ] && [ ! -e /opt/homebrew/bin/duf ]; then 161 | go install github.com/muesli/duf@latest 162 | fi 163 | unset -f duf 164 | duf "$@" 165 | } 166 | 167 | 168 | # broot File Manager ########################################################### 169 | if [[ -e $HOME/.config/broot/launcher/bash/br ]]; then 170 | source $HOME/.config/broot/launcher/bash/br 171 | fi 172 | 173 | 174 | # nnn File Manager ############################################################# 175 | export NNN_BMS="l:$HOME/Code/local;r:$HOME/Code/github.com;d:$HOME/Code/github.com/craigjperry2/dotfiles/dotfiles" 176 | export NNN_OPENER="$HOME/.config/nnn/plugins/nuke" 177 | export NNN_PLUG='d:-_git diff;l:_git log*;m:-_less -iR $nnn*;f:_|xdg_open $nnn' 178 | alias N="sudo -E nnn -dH" 179 | 180 | n () 181 | { 182 | if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then 183 | echo "nnn is already running" 184 | return 185 | fi 186 | 187 | NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" 188 | 189 | # Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn 190 | # stty start undef 191 | # stty stop undef 192 | # stty lwrap undef 193 | # stty lnext undef 194 | 195 | nnn -c "$@" 196 | 197 | if [ -f "$NNN_TMPFILE" ]; then 198 | . "$NNN_TMPFILE" 199 | rm -f "$NNN_TMPFILE" > /dev/null 200 | fi 201 | } 202 | 203 | 204 | ################################################################################ 205 | # MACOS SPECIFIC CONFIG 206 | ################################################################################ 207 | 208 | if [[ $OSTYPE == darwin* ]]; then 209 | 210 | # Apple watch & fingerprint sudo auth 211 | sudo() { 212 | unset -f sudo 213 | if ! grep --silent "pam_tid.so" /etc/pam.d/sudo ; then 214 | sudo sed -i.orig "1s/^/auth sufficient pam_tid.so\n/" /etc/pam.d/sudo 215 | fi 216 | sudo "$@" 217 | } 218 | 219 | # Compilation flags 220 | # export ARCHFLAGS="arch x86_64" 221 | 222 | # Homebrew package manager for Intel and M1 223 | alias brewup="brew update; brew upgrade; brew cleanup; brew doctor" 224 | FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH 225 | 226 | alias uu="brewup" 227 | 228 | # MacOS uses 'open' rather than 'xdg_open' 229 | export NNN_PLUG='l:_git log*;m:-_less -iR $nnn*;f:_|open $nnn' 230 | 231 | alias q="QHOME=~/q rlwrap -r ~/q/m64/q" 232 | 233 | # Finalise fzf integration 234 | if [[ ! "$PATH" == */opt/homebrew/opt/fzf/bin* ]]; then 235 | export PATH="${PATH:+${PATH}:}/opt/homebrew/opt/fzf/bin" 236 | fi 237 | [[ $- == *i* ]] && source "/opt/homebrew/opt/fzf/shell/completion.zsh" 2> /dev/null 238 | source "/opt/homebrew/opt/fzf/shell/key-bindings.zsh" 239 | 240 | # Android Studio & React Native 241 | if [ -d $HOME/Library/Android/sdk ]; then 242 | export ANDROID_HOME=$HOME/Library/Android/sdk 243 | export PATH=$PATH:$ANDROID_HOME/emulator 244 | export PATH=$PATH:$ANDROID_HOME/tools 245 | export PATH=$PATH:$ANDROID_HOME/tools/bin 246 | export PATH=$PATH:$ANDROID_HOME/platform-tools 247 | fi 248 | 249 | # Java OpenJDK 250 | export JAVA_HOME=$( /usr/libexec/java_home 2> /dev/null ) 251 | if [[ -n $JAVA_HOME ]]; then 252 | export PATH=$JAVA_HOME/bin:$PATH 253 | fi 254 | 255 | PSQL_PATH="/opt/homebrew/opt/postgresql@16/bin/" 256 | 257 | fi 258 | 259 | ################################################################################ 260 | # END MACOS CONFIG 261 | ################################################################################ 262 | 263 | 264 | ################################################################################ 265 | # FREEBSD SPECIFIC CONFIG 266 | ################################################################################ 267 | 268 | if [[ $OSTYPE == freebsd* ]]; then 269 | 270 | # Finalise fzf integration 271 | [[ $- == *i* ]] && source /usr/local/share/examples/fzf/shell/completion.zsh 2> /dev/null 272 | source "/usr/local/share/examples/fzf/shell/key-bindings.zsh" 273 | 274 | alias pg='ps -acdO user | fzf' 275 | 276 | fi 277 | 278 | ################################################################################ 279 | # END FREEBSD CONFIG 280 | ################################################################################ 281 | 282 | 283 | ################################################################################ 284 | # LINUX SPECIFIC CONFIG 285 | ################################################################################ 286 | 287 | if [[ $OSTYPE == linux* ]]; then 288 | 289 | alias q="QHOME=~/q rlwrap -r ~/q/l64/q" 290 | 291 | if [[ -e /etc/debian_version ]]; then 292 | 293 | alias uu="sudo apt update && sudo apt upgrade -y" 294 | 295 | # Finalise fzf integration 296 | [[ $- == *i* ]] && source /usr/share/doc/fzf/examples/completion.zsh 2> /dev/null 297 | source "/usr/share/doc/fzf/examples/key-bindings.zsh" 298 | 299 | if [[ $WSL_DISTRO_NAME == Ubuntu* ]]; then 300 | export PATH="/mnt/c/Program Files/Microsoft VS Code/bin:$PATH" 301 | fi 302 | 303 | else 304 | # Assume Fedora 305 | 306 | alias uu="sudo dnf upgrade -y" 307 | 308 | # Finalise fzf integration - Fedora 309 | [[ $- == *i* ]] && source "/usr/share/zsh/site-functions/fzf" 2> /dev/null 310 | source "/usr/share/fzf/shell/key-bindings.zsh" 311 | 312 | # Docker compose with podman 313 | export DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock 314 | 315 | fi 316 | 317 | if [[ -e /usr/local/bin/k3s ]]; then 318 | export KUBECONFIG="$HOME/.kube/config" 319 | [[ $commands[kubectl] ]] && source <(kubectl completion zsh) 320 | alias k="kubectl" 321 | fi 322 | 323 | fi 324 | 325 | ################################################################################ 326 | # END LINUX CONFIG 327 | ################################################################################ 328 | 329 | 330 | ################################################################################ 331 | # PLATFORM AGNOSTIC CONFIG FINISHING TOUCHES 332 | ################################################################################ 333 | 334 | alias c="clear" 335 | alias ll="ls -lrt" 336 | alias tmr="tmux new-session -ADs main" 337 | 338 | which bat > /dev/null 2>&1 339 | if [[ $? -eq 0 ]]; then 340 | export BAT_THEME="Solarized (light)" 341 | alias cat='bat --pager=never' 342 | fi 343 | 344 | which eza > /dev/null 2>&1 345 | if [[ $? -eq 0 ]]; then 346 | alias l="eza --git --grid --across --icons -l --header" 347 | alias ll="eza --git -l --colour=always --tree --level=2 --sort time --icons --header" 348 | export EZA_COLORS="xx=0" 349 | fi 350 | 351 | alias g="git" 352 | alias ga="g a" 353 | alias gac="g ac" 354 | alias gb="g b" 355 | alias gcm="g cm" 356 | alias gd="g d" 357 | alias gds="g ds" 358 | alias gl="g l" 359 | alias gps="g ps" 360 | alias gpl="g pl" 361 | alias gs="g s" 362 | alias gw="g w" 363 | 364 | # Git clone https://host.com/user/repo.git (or ssh://git@...) into ~/Code/user/repo 365 | gc() { 366 | repo=$1 367 | dest=$( echo $repo | sed -En 's#(.*@|https?://)(www\.)?([^:]*)(:|/)(.*)(.git)?#\3/\5#p' ) 368 | git clone $repo ~/Code/${dest} 369 | cd ~/Code/${dest} 370 | } 371 | 372 | alias vi="nvim" 373 | alias vim="nvim" 374 | export EDITOR="nvim" 375 | 376 | alias cdc="cd ~/Code" 377 | alias cdl="cd ~/Code/github.com/craigjperry2/sandbox" 378 | alias cdr="cd ~/Code/github.com/craigjperry2" 379 | alias cdd="cd ~/Code/github.com/craigjperry2/dotfiles/dotfiles" 380 | 381 | alias mkdir="mkdir -p" 382 | 383 | alias ec="$EDITOR $HOME/.zshrc" 384 | alias sc="source $HOME/.zshrc" 385 | 386 | alias ytd="yt-dlp -f 'bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b'" 387 | 388 | alias ppp="podman pull docker.io/library/postgres" 389 | alias prp="podman run --name postgres -e POSTGRES_PASSWORD=notsecure -d -p 5432:5432 postgres" 390 | alias pcp="podman cp $HOME/.psqlrc postgres:/root/.psqlrc" 391 | alias ppsql="pcp ; podman exec -it postgres psql -U postgres" 392 | alias psql="env PGPASSWORD=notsecure ${PSQL_PATH}psql -U postgres -h localhost" 393 | alias pprm="podman stop postgres ; podman rm postgres" 394 | 395 | alias btm="btm" 396 | 397 | 398 | # Added by LM Studio CLI (lms) 399 | export PATH="$PATH:/Users/craig/.lmstudio/bin" 400 | # End of LM Studio CLI section 401 | 402 | eval "$(starship init zsh)" 403 | 404 | --------------------------------------------------------------------------------