├── shell ├── .node-version ├── bin │ └── worktree-status └── .p10k.zsh ├── nvim └── .config │ └── nvim │ ├── lua │ ├── autocmds.lua │ ├── chadrc.lua │ ├── configs │ │ ├── conform.lua │ │ ├── lazy.lua │ │ └── lspconfig.lua │ ├── options.lua │ ├── plugins │ │ └── init.lua │ └── mappings.lua │ ├── .stylua.toml │ ├── README.md │ ├── init.lua │ ├── LICENSE │ └── lazy-lock.json ├── git ├── .gitignore_global └── .gitconfig ├── .gitignore ├── zsh ├── .zsh │ └── local.zsh.example └── .zshrc.dotfiles ├── README.md ├── Brewfile ├── ghostty └── .config │ └── ghostty │ └── config ├── llms.md └── install.sh /shell/.node-version: -------------------------------------------------------------------------------- 1 | v23.7.0 2 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/autocmds.lua: -------------------------------------------------------------------------------- 1 | require "nvchad.autocmds" 2 | -------------------------------------------------------------------------------- /git/.gitignore_global: -------------------------------------------------------------------------------- 1 | *~ 2 | .DS_Store 3 | .idea 4 | _cursor/ 5 | .claude/ 6 | -------------------------------------------------------------------------------- /nvim/.config/nvim/.stylua.toml: -------------------------------------------------------------------------------- 1 | column_width = 120 2 | line_endings = "Unix" 3 | indent_type = "Spaces" 4 | indent_width = 2 5 | quote_style = "AutoPreferDouble" 6 | call_parentheses = "None" 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS 2 | .DS_Store 3 | *~ 4 | 5 | # Secrets - NEVER commit these 6 | .netrc 7 | .npmrc 8 | .env 9 | .env.* 10 | *.cer 11 | *.pem 12 | *.key 13 | .aws/ 14 | 15 | # Machine-specific (should stay local) 16 | .zsh/local.zsh 17 | **/local.zsh 18 | 19 | # Editor 20 | .idea/ 21 | *.swp 22 | *.swo 23 | *~ 24 | 25 | # Claude/Cursor 26 | .claude/ 27 | _cursor/ 28 | 29 | # NVChad generated files (optional - remove if you want to track plugin state) 30 | # nvim/.config/nvim/lazy-lock.json 31 | -------------------------------------------------------------------------------- /nvim/.config/nvim/README.md: -------------------------------------------------------------------------------- 1 | **This repo is supposed to be used as config by NvChad users!** 2 | 3 | - The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. 4 | - So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"` 5 | - So you can delete the .git from this repo ( when you clone it locally ) or fork it :) 6 | 7 | # Credits 8 | 9 | 1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! 10 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/chadrc.lua: -------------------------------------------------------------------------------- 1 | -- This file needs to have same structure as nvconfig.lua 2 | -- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua 3 | -- Please read that file to know all available options :( 4 | 5 | ---@type ChadrcConfig 6 | local M = {} 7 | 8 | M.base46 = { 9 | theme = "chadracula-evondev", 10 | 11 | -- hl_override = { 12 | -- Comment = { italic = true }, 13 | -- ["@comment"] = { italic = true }, 14 | -- }, 15 | } 16 | 17 | -- Disable tabs 18 | M.ui = { 19 | tabufline = { 20 | enabled = false, 21 | }, 22 | } 23 | 24 | return M 25 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/configs/conform.lua: -------------------------------------------------------------------------------- 1 | local options = { 2 | formatters_by_ft = { 3 | lua = { "stylua" }, 4 | css = { "prettier" }, 5 | html = { "prettier" }, 6 | -- Only prettier on save (ESLint shows errors via LSP, fix manually with lf) 7 | javascript = { "prettier" }, 8 | javascriptreact = { "prettier" }, 9 | typescript = { "prettier" }, 10 | typescriptreact = { "prettier" }, 11 | json = { "prettier" }, 12 | jsonc = { "prettier" }, 13 | markdown = { "prettier" }, 14 | go = { "gofumpt" }, 15 | }, 16 | 17 | format_on_save = { 18 | timeout_ms = 2000, 19 | lsp_fallback = true, 20 | }, 21 | } 22 | 23 | return options 24 | -------------------------------------------------------------------------------- /zsh/.zsh/local.zsh.example: -------------------------------------------------------------------------------- 1 | # Local/work-specific shell configuration 2 | # Copy this to ~/.zsh/local.zsh and customize 3 | # This file is NOT committed to the dotfiles repo 4 | # vim: set ft=zsh : 5 | 6 | # ============================================ 7 | # Work Environment (Example) 8 | # ============================================ 9 | 10 | # Work-specific paths 11 | # export WORK_DIR="$HOME/work" 12 | # CDPATH=".:~:~/work:~/github" 13 | 14 | # Work aliases 15 | # alias myproject="cd ~/work/myproject" 16 | 17 | # Work-specific environment variables 18 | # export SOME_API_KEY="..." # Better: use a secrets manager 19 | 20 | # Source work-specific profile if it exists 21 | # [[ -f ~/.work_profile ]] && source ~/.work_profile 22 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/options.lua: -------------------------------------------------------------------------------- 1 | require "nvchad.options" 2 | 3 | -- add yours here! 4 | 5 | -- local o = vim.o 6 | -- o.cursorlineopt ='both' -- to enable cursorline! 7 | 8 | -- Relative line numbers with current line showing absolute number 9 | vim.opt.relativenumber = true 10 | vim.opt.number = true 11 | 12 | -- Enable OSC 52 clipboard for SSH sessions (works with Ghostty, iTerm2, etc.) 13 | -- This allows yanking to system clipboard over SSH 14 | local osc52 = require("vim.ui.clipboard.osc52") 15 | 16 | vim.g.clipboard = { 17 | name = "OSC 52", 18 | copy = { 19 | ["+"] = osc52.copy("+"), 20 | ["*"] = osc52.copy("*"), 21 | }, 22 | paste = { 23 | ["+"] = osc52.paste("+"), 24 | ["*"] = osc52.paste("*"), 25 | }, 26 | } 27 | 28 | vim.opt.clipboard = "unnamedplus" 29 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/configs/lazy.lua: -------------------------------------------------------------------------------- 1 | return { 2 | defaults = { lazy = true }, 3 | install = { colorscheme = { "nvchad" } }, 4 | 5 | ui = { 6 | icons = { 7 | ft = "", 8 | lazy = "󰂠 ", 9 | loaded = "", 10 | not_loaded = "", 11 | }, 12 | }, 13 | 14 | performance = { 15 | rtp = { 16 | disabled_plugins = { 17 | "2html_plugin", 18 | "tohtml", 19 | "getscript", 20 | "getscriptPlugin", 21 | "gzip", 22 | "logipat", 23 | "netrw", 24 | "netrwPlugin", 25 | "netrwSettings", 26 | "netrwFileHandlers", 27 | "matchit", 28 | "tar", 29 | "tarPlugin", 30 | "rrhelper", 31 | "spellfile_plugin", 32 | "vimball", 33 | "vimballPlugin", 34 | "zip", 35 | "zipPlugin", 36 | "rplugin", 37 | "syntax", 38 | "synmenu", 39 | "optwin", 40 | "compiler", 41 | "bugreport", 42 | "ftplugin", 43 | }, 44 | }, 45 | }, 46 | } 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | Personal dotfiles managed with [GNU Stow](https://www.gnu.org/software/stow/). 4 | 5 | ## Quickstart 6 | 7 | ```bash 8 | git clone https://github.com/tkh44/dotfiles ~/github/dotfiles 9 | cd ~/github/dotfiles 10 | ./install.sh 11 | ``` 12 | 13 | ## What's Included 14 | 15 | - **zsh** - Shell config with oh-my-zsh, Powerlevel10k, lazy-loaded nvm 16 | - **nvim** - Neovim with NVChad 17 | - **git** - Git aliases and settings 18 | - **ghostty** - Terminal config (JetBrainsMono Nerd Font) 19 | - **Brewfile** - CLI tools (bat, eza, fzf, zoxide, ripgrep, etc.) 20 | 21 | ## Structure 22 | 23 | Each directory is a [stow package](https://www.gnu.org/software/stow/manual/stow.html) that gets symlinked to `$HOME`. 24 | 25 | ``` 26 | zsh/ → ~/.zshrc, ~/.zsh/ 27 | nvim/ → ~/.config/nvim/ 28 | git/ → ~/.gitconfig, ~/.gitignore_global 29 | shell/ → ~/.p10k.zsh 30 | ghostty/ → ~/.config/ghostty/ 31 | ``` 32 | 33 | ## Machine-Specific Config 34 | 35 | Add local aliases and work config to `~/.zsh/local.zsh` (not tracked). 36 | 37 | See `llms.md` for detailed documentation. 38 | -------------------------------------------------------------------------------- /nvim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" 2 | vim.g.mapleader = " " 3 | 4 | -- Add fnm node to PATH (for GUI-launched Neovim where shell PATH isn't inherited) 5 | local fnm_node = vim.fn.expand("~/Library/Application Support/fnm/aliases/default/bin") 6 | if vim.fn.isdirectory(fnm_node) == 1 then 7 | vim.env.PATH = fnm_node .. ":" .. vim.env.PATH 8 | end 9 | 10 | -- bootstrap lazy and all plugins 11 | local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" 12 | 13 | if not vim.uv.fs_stat(lazypath) then 14 | local repo = "https://github.com/folke/lazy.nvim.git" 15 | vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } 16 | end 17 | 18 | vim.opt.rtp:prepend(lazypath) 19 | 20 | local lazy_config = require "configs.lazy" 21 | 22 | -- load plugins 23 | require("lazy").setup({ 24 | { 25 | "NvChad/NvChad", 26 | lazy = false, 27 | branch = "v2.5", 28 | import = "nvchad.plugins", 29 | }, 30 | 31 | { import = "plugins" }, 32 | }, lazy_config) 33 | 34 | -- load theme 35 | dofile(vim.g.base46_cache .. "defaults") 36 | dofile(vim.g.base46_cache .. "statusline") 37 | 38 | require "options" 39 | require "autocmds" 40 | 41 | vim.schedule(function() 42 | require "mappings" 43 | end) 44 | -------------------------------------------------------------------------------- /nvim/.config/nvim/LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | # Dotfiles Brewfile 2 | # Install with: brew bundle 3 | 4 | # Taps 5 | tap "homebrew/bundle" 6 | 7 | # CLI Tools 8 | brew "bat" # Better cat 9 | brew "eza" # Better ls 10 | brew "fzf" # Fuzzy finder 11 | brew "zoxide" # Smart cd 12 | brew "ripgrep" # Better grep 13 | brew "fd" # Better find 14 | brew "neovim" # Editor 15 | brew "stow" # Dotfiles symlink manager 16 | brew "git" # Version control 17 | brew "gh" # GitHub CLI 18 | brew "coreutils" # GNU core utilities (gdate, etc.) 19 | brew "gnupg" # GPG for commit signing 20 | 21 | # Shell 22 | brew "zsh" 23 | 24 | # Development 25 | brew "fnm" # Fast Node Manager (manages Node versions) 26 | brew "go" # Go language 27 | brew "bun" # Fast JS/TS runtime for CLI tools 28 | 29 | # Optional - uncomment if needed 30 | # brew "tmux" # Terminal multiplexer 31 | # brew "jq" # JSON processor 32 | # brew "htop" # Process viewer 33 | # brew "wget" # Download tool 34 | # brew "tree" # Directory tree view 35 | 36 | # Fonts (required for terminal/editor) 37 | cask "font-jetbrains-mono-nerd-font" # Used by Ghostty and p10k 38 | 39 | # Casks (GUI apps) 40 | cask "ghostty" # Terminal emulator 41 | # cask "iterm2" 42 | # cask "visual-studio-code" 43 | # cask "cursor" 44 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/configs/lspconfig.lua: -------------------------------------------------------------------------------- 1 | require("nvchad.configs.lspconfig").defaults() 2 | 3 | local servers = { 4 | "html", 5 | "cssls", 6 | "ts_ls", -- TypeScript/JavaScript LSP 7 | "eslint", -- ESLint for linting 8 | "gopls", -- Go LSP 9 | } 10 | 11 | vim.lsp.enable(servers) 12 | 13 | -- TypeScript-specific settings 14 | vim.lsp.config("ts_ls", { 15 | settings = { 16 | typescript = { 17 | inlayHints = { 18 | includeInlayParameterNameHints = "all", 19 | includeInlayParameterNameHintsWhenArgumentMatchesName = false, 20 | includeInlayFunctionParameterTypeHints = true, 21 | includeInlayVariableTypeHints = true, 22 | includeInlayPropertyDeclarationTypeHints = true, 23 | includeInlayFunctionLikeReturnTypeHints = true, 24 | includeInlayEnumMemberValueHints = true, 25 | }, 26 | }, 27 | javascript = { 28 | inlayHints = { 29 | includeInlayParameterNameHints = "all", 30 | includeInlayParameterNameHintsWhenArgumentMatchesName = false, 31 | includeInlayFunctionParameterTypeHints = true, 32 | includeInlayVariableTypeHints = true, 33 | includeInlayPropertyDeclarationTypeHints = true, 34 | includeInlayFunctionLikeReturnTypeHints = true, 35 | includeInlayEnumMemberValueHints = true, 36 | }, 37 | }, 38 | }, 39 | }) 40 | 41 | -- read :h vim.lsp.config for changing options of lsp servers 42 | -------------------------------------------------------------------------------- /git/.gitconfig: -------------------------------------------------------------------------------- 1 | [http] 2 | postBuffer = 524288000 3 | [mergetool] 4 | keepBackup = false 5 | [core] 6 | excludesfile = ~/.gitignore_global 7 | autocrlf = input 8 | whitespace = trailing-space,space-before-tab 9 | [diff] 10 | mnemonicprefix = true 11 | [push] 12 | default = simple 13 | autoSetupRemote = true 14 | [merge] 15 | stat = true 16 | [credential] 17 | helper = osxkeychain 18 | [url "git@github.com:"] 19 | insteadOf = https://github.com/ 20 | [feature] 21 | manyFiles = 1 22 | [user] 23 | name = Kye Hohenberger 24 | email = kye.hohenberger@instacart.com 25 | # email and signingkey are set in ~/.gitconfig.local (not in dotfiles) 26 | 27 | # Include local/machine-specific config (email, signing key, work settings) 28 | [include] 29 | path = ~/.gitconfig.local 30 | [pull] 31 | rebase = false 32 | [alias] 33 | rb = "!git checkout $(git for-each-ref --sort='-committerdate' --format='%(refname)%09%(committerdate)' refs/heads | sed -e 's-refs/heads/--' | fzf | cut -f1)" 34 | s = status 35 | [commit] 36 | gpgsign = true 37 | [oh-my-zsh] 38 | hide-dirty = 1 39 | [branch] 40 | sort = committerdate 41 | [safe] 42 | directory = /var/app 43 | directory = /var/app 44 | directory = /var/app 45 | directory = /var/app 46 | directory = /var/app 47 | directory = /var/app 48 | directory = /var/app 49 | directory = /var/app 50 | directory = /var/app 51 | directory = /var/app 52 | directory = /var/app 53 | directory = /var/app 54 | directory = /var/app 55 | directory = /var/app 56 | directory = /var/app 57 | directory = /var/app 58 | directory = /var/app 59 | directory = /var/app 60 | directory = /var/app 61 | directory = /var/app 62 | directory = /var/app 63 | directory = /var/app 64 | directory = /var/app 65 | directory = /var/app 66 | directory = /var/app 67 | directory = /var/app 68 | directory = /var/app 69 | directory = /var/app 70 | directory = /var/app 71 | directory = /var/app 72 | directory = /var/app 73 | directory = /var/app 74 | directory = /var/app 75 | directory = /var/app 76 | directory = /var/app 77 | directory = /var/app 78 | directory = /var/app 79 | directory = /var/app 80 | directory = /var/app 81 | directory = /var/app 82 | directory = /var/app 83 | directory = /var/app 84 | directory = /var/app 85 | directory = /var/app 86 | directory = /var/app 87 | directory = /var/app 88 | directory = /var/app 89 | directory = /var/app 90 | directory = /var/app 91 | directory = /var/app 92 | directory = /var/app 93 | directory = /var/app 94 | directory = /var/app 95 | directory = /var/app 96 | directory = /var/app 97 | directory = /var/app 98 | directory = /var/app 99 | directory = /var/app 100 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" }, 3 | "NvChad": { "branch": "v2.5", "commit": "eb209a4a82aecabe609d8206b865e00a760fb644" }, 4 | "base46": { "branch": "v3.0", "commit": "45b336ec52615dd1a3aa47848d894616dd6293a5" }, 5 | "cmp-async-path": { "branch": "main", "commit": "b8aade3a0626f2bc1d3cd79affcd7da9f47f7ab1" }, 6 | "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, 7 | "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, 8 | "cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" }, 9 | "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, 10 | "conform.nvim": { "branch": "master", "commit": "ffe26e8df8115c9665d24231f8a49fadb2d611ce" }, 11 | "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, 12 | "gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" }, 13 | "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, 14 | "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, 15 | "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, 16 | "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, 17 | "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, 18 | "nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" }, 19 | "nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" }, 20 | "nvim-lspconfig": { "branch": "master", "commit": "9c923997123ff9071198ea3b594d4c1931fab169" }, 21 | "nvim-tree.lua": { "branch": "master", "commit": "59088b96a32ea47caf4976e164dbd88b86447fb7" }, 22 | "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, 23 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, 24 | "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, 25 | "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, 26 | "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, 27 | "telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" }, 28 | "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, 29 | "ui": { "branch": "v3.0", "commit": "bea2af0a76c1098fac0988ad296aa028cad2a333" }, 30 | "volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" }, 31 | "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } 32 | } 33 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- Telescope: configure find_files to include .cursor directory 3 | { 4 | "nvim-telescope/telescope.nvim", 5 | opts = { 6 | defaults = { 7 | file_ignore_patterns = { 8 | "node_modules/", 9 | ".git/", 10 | "dist/", 11 | "build/", 12 | }, 13 | }, 14 | pickers = { 15 | find_files = { 16 | -- Include gitignored files but use file_ignore_patterns above 17 | hidden = true, 18 | find_command = { 19 | "fd", 20 | "--type", "f", 21 | "--hidden", 22 | "--no-ignore-vcs", -- Include gitignored files 23 | "--exclude", "node_modules", 24 | "--exclude", ".git", 25 | "--exclude", "dist", 26 | "--exclude", "build", 27 | "--exclude", ".next", 28 | "--exclude", "coverage", 29 | }, 30 | }, 31 | }, 32 | }, 33 | }, 34 | 35 | -- NvimTree: show gitignored files 36 | { 37 | "nvim-tree/nvim-tree.lua", 38 | opts = { 39 | git = { 40 | enable = true, 41 | ignore = false, -- show gitignored files 42 | }, 43 | filters = { 44 | dotfiles = false, 45 | git_ignored = false, -- show gitignored files 46 | }, 47 | }, 48 | }, 49 | 50 | { 51 | "stevearc/conform.nvim", 52 | event = "BufWritePre", -- format on save enabled 53 | opts = require "configs.conform", 54 | }, 55 | 56 | { 57 | "neovim/nvim-lspconfig", 58 | config = function() 59 | require "configs.lspconfig" 60 | end, 61 | }, 62 | 63 | -- Treesitter with TypeScript/React support 64 | { 65 | "nvim-treesitter/nvim-treesitter", 66 | opts = { 67 | ensure_installed = { 68 | "vim", 69 | "lua", 70 | "vimdoc", 71 | "html", 72 | "css", 73 | "javascript", 74 | "typescript", 75 | "tsx", 76 | "json", 77 | "jsonc", 78 | "markdown", 79 | "markdown_inline", 80 | "go", 81 | "gomod", 82 | "gosum", 83 | "gowork", 84 | }, 85 | }, 86 | }, 87 | 88 | -- Auto-close and auto-rename JSX tags 89 | { 90 | "windwp/nvim-ts-autotag", 91 | ft = { 92 | "html", 93 | "javascript", 94 | "typescript", 95 | "javascriptreact", 96 | "typescriptreact", 97 | "svelte", 98 | "vue", 99 | "tsx", 100 | "jsx", 101 | "xml", 102 | }, 103 | config = function() 104 | require("nvim-ts-autotag").setup() 105 | end, 106 | }, 107 | 108 | -- Better TypeScript error display (optional but nice) 109 | { 110 | "folke/trouble.nvim", 111 | cmd = { "Trouble", "TroubleToggle" }, 112 | opts = {}, 113 | }, 114 | } 115 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/mappings.lua: -------------------------------------------------------------------------------- 1 | require "nvchad.mappings" 2 | 3 | -- add yours here 4 | 5 | local map = vim.keymap.set 6 | 7 | map("n", ";", ":", { desc = "CMD enter command mode" }) 8 | map("i", "jk", "") 9 | 10 | -- Recent files (like WebStorm Cmd+E) 11 | map("n", "e", "Telescope oldfiles", { desc = "Recent files" }) 12 | 13 | -- Grep selected text in visual mode 14 | map("v", "fw", function() 15 | local text = vim.getVisualSelection() 16 | require("telescope.builtin").live_grep({ default_text = text }) 17 | end, { desc = "Live grep selection" }) 18 | 19 | -- Grep word under cursor (normal mode) 20 | map("n", "*", function() 21 | local word = vim.fn.expand("") 22 | require("telescope.builtin").live_grep({ default_text = word }) 23 | end, { desc = "Live grep word under cursor" }) 24 | 25 | -- Helper function to get visual selection 26 | function vim.getVisualSelection() 27 | vim.cmd('noau normal! "vy"') 28 | local text = vim.fn.getreg('v') 29 | vim.fn.setreg('v', {}) 30 | text = string.gsub(text, "\n", "") 31 | if #text > 0 then 32 | return text 33 | else 34 | return '' 35 | end 36 | end 37 | 38 | -- map({ "n", "i", "v" }, "", " w ") 39 | 40 | -- TypeScript specific mappings 41 | -- Auto-import: use code action (leader+ca shows all, or use specific import action) 42 | map("n", "i", function() 43 | vim.lsp.buf.code_action({ 44 | apply = true, 45 | filter = function(action) 46 | return action.title:match("Add import") or action.title:match("Import") 47 | end, 48 | }) 49 | end, { desc = "Auto import" }) 50 | 51 | -- Add all missing imports 52 | map("n", "ai", function() 53 | vim.lsp.buf.code_action({ 54 | apply = true, 55 | filter = function(action) 56 | return action.title:match("Add all missing imports") 57 | end, 58 | }) 59 | end, { desc = "Add all missing imports" }) 60 | 61 | -- Organize imports (remove unused, sort) 62 | map("n", "oi", function() 63 | vim.lsp.buf.code_action({ 64 | apply = true, 65 | filter = function(action) 66 | return action.title:match("Organize imports") 67 | end, 68 | }) 69 | end, { desc = "Organize imports" }) 70 | 71 | -- ESLint fix all (manual trigger) 72 | map("n", "lf", function() 73 | vim.cmd("EslintFixAll") 74 | end, { desc = "ESLint fix all" }) 75 | 76 | -- Git blame 77 | map("n", "gb", function() 78 | require("gitsigns").blame_line({ full = true }) 79 | end, { desc = "Git blame line" }) 80 | 81 | map("n", "gB", function() 82 | require("gitsigns").blame() 83 | end, { desc = "Git blame buffer (full file)" }) 84 | 85 | -- Toggle inline blame (shows at end of current line) 86 | map("n", "gt", function() 87 | require("gitsigns").toggle_current_line_blame() 88 | end, { desc = "Toggle inline git blame" }) 89 | 90 | -- Reload Neovim config 91 | map("n", "rr", function() 92 | vim.cmd("source $MYVIMRC") 93 | vim.notify("Config reloaded!", vim.log.levels.INFO) 94 | end, { desc = "Reload config" }) 95 | -------------------------------------------------------------------------------- /zsh/.zshrc.dotfiles: -------------------------------------------------------------------------------- 1 | # Skip heavy shell init for AI agents (Cursor, Claude Code) 2 | if [[ -n "$CURSOR_AGENT" || -n "$CLAUDE_CODE" ]]; then 3 | PS1='%~ %# ' 4 | SKIP_HEAVY_SHELL_INIT=1 5 | fi 6 | 7 | # Enable Powerlevel10k instant prompt (only for interactive non-agent shells) 8 | if [[ -z "$SKIP_HEAVY_SHELL_INIT" && -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then 9 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" 10 | fi 11 | 12 | # Path to your oh-my-zsh installation. 13 | export ZSH="$HOME/.oh-my-zsh" 14 | 15 | # Homebrew (needed early for fnm and other brew packages) 16 | eval "$(/opt/homebrew/bin/brew shellenv)" 17 | 18 | # fnm (Fast Node Manager) - fast, no lazy loading needed 19 | # --version-file-strategy=recursive: looks up parent dirs for .node-version/.nvmrc 20 | # --log-level=quiet: suppress output to avoid breaking p10k instant prompt 21 | eval "$(fnm env --use-on-cd --version-file-strategy=recursive --log-level=quiet)" 22 | 23 | if [[ -z "$SKIP_HEAVY_SHELL_INIT" ]]; then 24 | ZSH_THEME="powerlevel10k/powerlevel10k" 25 | plugins=(git) 26 | source $ZSH/oh-my-zsh.sh 27 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh 28 | fi 29 | 30 | # Environment variables 31 | export github="$HOME/github" 32 | 33 | # Aliases - Personal 34 | alias nano="code" 35 | alias cat="bat" 36 | alias ls="eza --icons" 37 | alias ff="fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'" 38 | alias date="gdate" 39 | alias pn="pnpm" 40 | alias vim=nvim 41 | alias vi=nvim 42 | alias ws=worktree-status 43 | alias bathelp='bat --plain --language=help' 44 | 45 | export BAT_THEME="Nord" 46 | 47 | batdiff() { 48 | git diff --name-only --relative --diff-filter=d | xargs bat --diff 49 | } 50 | 51 | help() { 52 | "$@" --help 2>&1 | bathelp 53 | } 54 | 55 | export GPG_TTY=$(tty) 56 | 57 | # Default editors 58 | export EDITOR="nvim" 59 | export VISUAL="nvim" 60 | export GIT_EDITOR="nvim" 61 | 62 | export PATH="/usr/local/bin:$PATH" 63 | export PATH="$HOME/go/bin:$PATH" 64 | export PATH="$HOME/bin:$PATH" 65 | 66 | # Skip heavy shell integrations in agent mode 67 | if [[ -z "$SKIP_HEAVY_SHELL_INIT" ]]; then 68 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 69 | fi 70 | 71 | export PGHOST=localhost 72 | 73 | # Rust 74 | [[ -f "$HOME/.cargo/env" ]] && source "$HOME/.cargo/env" 75 | 76 | export BUN_INSTALL="$HOME/.bun" 77 | export PATH="$BUN_INSTALL/bin:$PATH" 78 | 79 | # Skip heavy completions in agent mode 80 | if [[ -z "$SKIP_HEAVY_SHELL_INIT" ]]; then 81 | # bun completions 82 | [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun" 83 | fi 84 | 85 | function cursor { 86 | open -a "/Applications/Cursor.app" "$@" 87 | } 88 | 89 | [[ -f "$HOME/.local/bin/env" ]] && . "$HOME/.local/bin/env" 90 | 91 | # Custom terminal title: "dir|process" 92 | function set_terminal_title() { 93 | local dir="${PWD##*/}" 94 | [[ -z "$dir" ]] && dir="~" 95 | print -Pn "\e]0;${dir}|zsh\a" 96 | } 97 | 98 | function set_terminal_title_with_cmd() { 99 | local dir="${PWD##*/}" 100 | [[ -z "$dir" ]] && dir="~" 101 | local cmd="${1[(w)1]}" 102 | print -Pn "\e]0;${dir}|${cmd}\a" 103 | } 104 | 105 | precmd_functions+=(set_terminal_title) 106 | preexec_functions+=(set_terminal_title_with_cmd) 107 | 108 | # Cached zoxide init (regenerate with: zoxide init zsh > ~/.cache/zoxide.zsh) 109 | [[ -f ~/.cache/zoxide.zsh ]] && source ~/.cache/zoxide.zsh 110 | 111 | # Source local/work-specific config (not in dotfiles repo) 112 | [[ -f ~/.zsh/local.zsh ]] && source ~/.zsh/local.zsh 113 | -------------------------------------------------------------------------------- /ghostty/.config/ghostty/config: -------------------------------------------------------------------------------- 1 | # ============================================================================ 2 | # Ghostty Terminal Configuration 3 | # ============================================================================ 4 | # Reload config: cmd+shift+, 5 | # Documentation: https://ghostty.org/docs/config/reference 6 | 7 | # ============================================================================ 8 | # Appearance 9 | # ============================================================================ 10 | 11 | # Theme and Colors 12 | theme = JetBrains Darcula 13 | 14 | # Brighten foreground text for better readability 15 | foreground = #e8e8e8 16 | 17 | # Font Configuration 18 | font-family = "JetBrainsMono Nerd Font" 19 | font-size = 16 20 | # font-style = regular 21 | # font-style-bold = bold 22 | # font-style-italic = italic 23 | 24 | # Window Settings 25 | window-decoration = true 26 | window-padding-x = 8 27 | window-padding-y = 8 28 | # window-padding-balance = true 29 | 30 | # Session Restoration (macOS only) 31 | window-save-state = always 32 | window-inherit-working-directory = true 33 | 34 | # Cursor 35 | cursor-style = block 36 | cursor-style-blink = true 37 | 38 | # Background and Opacity 39 | background-opacity = 1.0 40 | # background-blur-radius = 0 41 | 42 | # ============================================================================ 43 | # Terminal Behavior 44 | # ============================================================================ 45 | 46 | # Shell Integration (enables features like cmd+click on paths, directory tracking) 47 | shell-integration = detect 48 | shell-integration-features = cursor,sudo,title 49 | 50 | # Clipboard 51 | clipboard-read = allow 52 | clipboard-write = allow 53 | copy-on-select = clipboard 54 | clipboard-trim-trailing-spaces = true 55 | 56 | # Mouse 57 | mouse-hide-while-typing = true 58 | # mouse-scroll-multiplier = 1.0 59 | 60 | # ============================================================================ 61 | # Performance & Advanced 62 | # ============================================================================ 63 | 64 | # Quick Terminal (macOS dropdown terminal) 65 | quick-terminal-position = top 66 | quick-terminal-screen = main 67 | quick-terminal-animation-duration = 200 68 | 69 | # Scrollback 70 | # scrollback-limit = 10000 71 | 72 | # Title 73 | # title = "Ghostty" 74 | window-title-font-family = "JetBrainsMono Nerd Font" 75 | 76 | # ============================================================================ 77 | # Keybindings 78 | # ============================================================================ 79 | # Uncomment and customize as needed 80 | # List defaults: ghostty +list-keybinds --default 81 | 82 | # Fix shift+tab to send standard reverse-tab sequence 83 | keybind = shift+tab=text:\x1b[Z 84 | 85 | # Fix shift+enter to send newline instead of escape sequence 86 | keybind = shift+enter=text:\n 87 | 88 | # Quick Terminal toggle (pick a keybind that doesn't conflict with macOS) 89 | # keybind = global:ctrl+`=toggle_quick_terminal 90 | 91 | # keybind = ctrl+shift+c=copy_to_clipboard 92 | # keybind = ctrl+shift+v=paste_from_clipboard 93 | # keybind = cmd+t=new_tab 94 | # keybind = cmd+w=close_surface 95 | # keybind = cmd+n=new_window 96 | # keybind = cmd+plus=increase_font_size:1 97 | # keybind = cmd+minus=decrease_font_size:1 98 | # keybind = cmd+zero=reset_font_size 99 | 100 | # ============================================================================ 101 | # Additional Options 102 | # ============================================================================ 103 | # Uncomment and configure as needed: 104 | 105 | # Command to run on startup 106 | # command = /bin/zsh 107 | 108 | # Confirm before closing 109 | confirm-close-surface = false 110 | 111 | # Auto-update (macOS) 112 | # auto-update = check 113 | -------------------------------------------------------------------------------- /llms.md: -------------------------------------------------------------------------------- 1 | # Dotfiles Repository 2 | 3 | > Personal dotfiles managed with GNU Stow for Kye Hohenberger (@tkh44) 4 | 5 | ## What This Is 6 | 7 | A portable, version-controlled collection of shell and editor configurations. Uses GNU Stow for symlink management - each top-level directory is a "package" that gets symlinked to $HOME. 8 | 9 | ## Repository Structure 10 | 11 | ``` 12 | dotfiles/ 13 | ├── install.sh # One-command bootstrap script 14 | ├── Brewfile # Homebrew packages to install 15 | ├── llms.txt # This file - AI context 16 | ├── zsh/ # Stow package → ~/.zshrc, ~/.zsh/ 17 | ├── nvim/ # Stow package → ~/.config/nvim/ 18 | ├── git/ # Stow package → ~/.gitconfig, ~/.gitignore_global 19 | ├── shell/ # Stow package → ~/.p10k.zsh 20 | └── ghostty/ # Stow package → ~/.config/ghostty/ 21 | ``` 22 | 23 | ## How Stow Works 24 | 25 | Each directory is a "package". Running `stow zsh` creates symlinks: 26 | - `dotfiles/zsh/.zshrc` → `~/.zshrc` 27 | - `dotfiles/zsh/.zsh/` → `~/.zsh/` 28 | 29 | The directory structure inside each package mirrors $HOME. 30 | 31 | ## Key Files 32 | 33 | | File | Purpose | 34 | |------|---------| 35 | | `zsh/.zshrc` | Main shell config (oh-my-zsh, aliases, functions) | 36 | | `zsh/.zsh/local.zsh.example` | Template for machine-specific config | 37 | | `nvim/.config/nvim/` | NVChad-based Neovim setup | 38 | | `git/.gitconfig` | Git aliases and preferences (no email/keys) | 39 | | `shell/.p10k.zsh` | Powerlevel10k prompt theme | 40 | | `ghostty/.config/ghostty/config` | Ghostty terminal config (JetBrainsMono Nerd Font) | 41 | | `Brewfile` | CLI tools, fonts (JetBrainsMono Nerd Font), Ghostty | 42 | 43 | ## How to Modify 44 | 45 | ### Adding a new dotfile to an existing package 46 | ```bash 47 | # Example: add .tmux.conf to shell package 48 | mkdir -p dotfiles/shell 49 | cp ~/.tmux.conf dotfiles/shell/.tmux.conf 50 | cd dotfiles && stow shell 51 | ``` 52 | 53 | ### Creating a new package 54 | ```bash 55 | # Example: add tmux as new package 56 | mkdir -p dotfiles/tmux 57 | cp ~/.tmux.conf dotfiles/tmux/.tmux.conf 58 | cd dotfiles && stow tmux 59 | # Update install.sh to include: stow_package "tmux" 60 | ``` 61 | 62 | ### Adding a config in ~/.config/ 63 | ```bash 64 | # Example: add kitty terminal config 65 | mkdir -p dotfiles/kitty/.config/kitty 66 | cp ~/.config/kitty/kitty.conf dotfiles/kitty/.config/kitty/ 67 | cd dotfiles && stow kitty 68 | ``` 69 | 70 | ### Adding Homebrew packages 71 | Edit `Brewfile` and add: 72 | ``` 73 | brew "package-name" 74 | # or for GUI apps: 75 | cask "app-name" 76 | ``` 77 | 78 | ### Machine-specific config 79 | Edit `~/.zsh/local.zsh` (this file is NOT in the repo): 80 | - Work aliases and paths 81 | - Machine-specific environment variables 82 | - API keys (use secrets manager when possible) 83 | 84 | ## What NOT to Commit 85 | 86 | NEVER add these to the repo: 87 | - `.netrc` - credentials 88 | - `.npmrc` - registry tokens 89 | - `.aws/` - AWS credentials 90 | - `.env*` - environment secrets 91 | - `*.cer`, `*.pem`, `*.key` - certificates/keys 92 | - `.zsh/local.zsh` - machine-specific config 93 | - Work-specific profiles 94 | 95 | ## Common Tasks 96 | 97 | ### Fresh machine setup 98 | ```bash 99 | git clone https://github.com/tkh44/dotfiles ~/github/dotfiles 100 | cd ~/github/dotfiles 101 | ./install.sh 102 | ``` 103 | 104 | ### Update after editing dotfiles 105 | ```bash 106 | cd ~/github/dotfiles 107 | git add -A && git commit -m "Update config" && git push 108 | ``` 109 | 110 | ### Pull changes on another machine 111 | ```bash 112 | cd ~/github/dotfiles 113 | git pull 114 | # Stow will update symlinks automatically since files are linked 115 | ``` 116 | 117 | ### Remove a package 118 | ```bash 119 | cd ~/github/dotfiles 120 | stow -D package-name # Removes symlinks 121 | ``` 122 | 123 | ## Tech Stack 124 | 125 | - **Shell**: Zsh + Oh My Zsh + Powerlevel10k 126 | - **Editor**: Neovim with NVChad 127 | - **Tools**: bat, eza, fzf, zoxide, ripgrep 128 | - **Management**: GNU Stow 129 | 130 | ## Links 131 | 132 | - Repository: https://github.com/tkh44/dotfiles 133 | - GNU Stow: https://www.gnu.org/software/stow/ 134 | - Oh My Zsh: https://ohmyz.sh/ 135 | - NVChad: https://nvchad.com/ 136 | - Powerlevel10k: https://github.com/romkatv/powerlevel10k 137 | -------------------------------------------------------------------------------- /shell/bin/worktree-status: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bun 2 | /** 3 | * worktree-status - Show all worktrees for a repo with their branches 4 | * Usage: worktree-status 5 | */ 6 | 7 | import { $ } from "bun"; 8 | import { existsSync } from "fs"; 9 | import { basename, join } from "path"; 10 | import { homedir } from "os"; 11 | 12 | const color = (s: string, c: string) => `${Bun.color(c, "ansi")}${s}\x1b[0m`; 13 | 14 | const SEARCH_PATHS = [ 15 | join(homedir(), "github"), 16 | join(homedir(), "instacart"), 17 | join(homedir(), "ava"), 18 | homedir(), 19 | ]; 20 | 21 | async function findRepo(repoName: string): Promise { 22 | // Check common locations first 23 | for (const base of SEARCH_PATHS) { 24 | const repoPath = join(base, repoName); 25 | const gitDir = join(repoPath, ".git"); 26 | if (existsSync(gitDir)) { 27 | return repoPath; 28 | } 29 | } 30 | 31 | // Fallback to fd search 32 | try { 33 | const result = await $`fd -t d -H "^${repoName}$" ${homedir()} --max-depth 3` 34 | .quiet() 35 | .text(); 36 | const firstMatch = result.trim().split("\n")[0]; 37 | if (firstMatch && existsSync(firstMatch)) { 38 | return firstMatch; 39 | } 40 | } catch { 41 | // fd not found or no results 42 | } 43 | 44 | return null; 45 | } 46 | 47 | interface Worktree { 48 | path: string; 49 | head: string; 50 | branch: string; 51 | } 52 | 53 | async function parseWorktrees(repoPath: string): Promise { 54 | const output = await $`git -C ${repoPath} worktree list --porcelain` 55 | .quiet() 56 | .text(); 57 | 58 | const worktrees: Worktree[] = []; 59 | let current: Partial = {}; 60 | 61 | for (const line of output.split("\n")) { 62 | if (line.startsWith("worktree ")) { 63 | current.path = line.slice(9); 64 | } else if (line.startsWith("HEAD ")) { 65 | current.head = line.slice(5, 12); // First 7 chars of SHA 66 | } else if (line.startsWith("branch refs/heads/")) { 67 | current.branch = line.slice(18); 68 | } else if (line === "detached") { 69 | current.branch = "(detached)"; 70 | } else if (line === "" && current.path) { 71 | worktrees.push(current as Worktree); 72 | current = {}; 73 | } 74 | } 75 | 76 | // Handle last entry if no trailing newline 77 | if (current.path) { 78 | worktrees.push(current as Worktree); 79 | } 80 | 81 | return worktrees; 82 | } 83 | 84 | async function getWorktreeStatus( 85 | worktreePath: string 86 | ): Promise<{ hasChanges: boolean; ahead: number; behind: number }> { 87 | if (!existsSync(worktreePath)) { 88 | return { hasChanges: false, ahead: 0, behind: 0 }; 89 | } 90 | 91 | let hasChanges = false; 92 | let ahead = 0; 93 | let behind = 0; 94 | 95 | try { 96 | // Check for uncommitted changes 97 | const diffResult = await $`git -C ${worktreePath} diff --quiet`.quiet().nothrow(); 98 | const diffCachedResult = await $`git -C ${worktreePath} diff --cached --quiet`.quiet().nothrow(); 99 | hasChanges = diffResult.exitCode !== 0 || diffCachedResult.exitCode !== 0; 100 | } catch { 101 | // Ignore errors 102 | } 103 | 104 | try { 105 | // Get ahead/behind counts 106 | const aheadBehind = await $`git -C ${worktreePath} rev-list --left-right --count HEAD...@{upstream}` 107 | .quiet() 108 | .text(); 109 | const [aheadStr, behindStr] = aheadBehind.trim().split(/\s+/); 110 | ahead = parseInt(aheadStr, 10) || 0; 111 | behind = parseInt(behindStr, 10) || 0; 112 | } catch { 113 | // No upstream or other error 114 | } 115 | 116 | return { hasChanges, ahead, behind }; 117 | } 118 | 119 | function colorBranch(branch: string): string { 120 | if (branch === "main" || branch === "master") { 121 | return color(branch, "green"); 122 | } else if (branch === "(detached)") { 123 | return color(branch, "yellow"); 124 | } 125 | return color(branch, "cyan"); 126 | } 127 | 128 | async function main() { 129 | const repoName = process.argv[2]; 130 | 131 | if (!repoName) { 132 | console.log("Usage: worktree-status "); 133 | console.log("Example: worktree-status isc-web"); 134 | process.exit(1); 135 | } 136 | 137 | const repoPath = await findRepo(repoName); 138 | 139 | if (!repoPath) { 140 | console.log(`Could not find repo: ${repoName}`); 141 | process.exit(1); 142 | } 143 | 144 | // Verify it's a git repo 145 | try { 146 | await $`git -C ${repoPath} rev-parse --git-dir`.quiet(); 147 | } catch { 148 | console.log(`Not a git repository: ${repoPath}`); 149 | process.exit(1); 150 | } 151 | 152 | console.log(); 153 | console.log(`${repoName}`); 154 | console.log(` ${repoPath}`); 155 | console.log(); 156 | 157 | const worktrees = await parseWorktrees(repoPath); 158 | 159 | for (const wt of worktrees) { 160 | const dirName = basename(wt.path); 161 | const status = await getWorktreeStatus(wt.path); 162 | 163 | let statusStr = ""; 164 | if (status.hasChanges) statusStr += " *"; 165 | if (status.ahead > 0) statusStr += ` ↑${status.ahead}`; 166 | if (status.behind > 0) statusStr += ` ↓${status.behind}`; 167 | 168 | const branchStr = colorBranch(wt.branch); 169 | console.log(` ${dirName.padEnd(30)} ${branchStr}${statusStr}`); 170 | } 171 | 172 | console.log(); 173 | } 174 | 175 | main(); 176 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 5 | 6 | echo "===================================" 7 | echo " Dotfiles Installation Script" 8 | echo "===================================" 9 | echo "" 10 | 11 | # Check for Homebrew 12 | if ! command -v brew &> /dev/null; then 13 | echo "Installing Homebrew..." 14 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 15 | 16 | # Add Homebrew to PATH for this session 17 | if [[ -f /opt/homebrew/bin/brew ]]; then 18 | eval "$(/opt/homebrew/bin/brew shellenv)" 19 | elif [[ -f /usr/local/bin/brew ]]; then 20 | eval "$(/usr/local/bin/brew shellenv)" 21 | fi 22 | else 23 | echo "Homebrew already installed" 24 | fi 25 | 26 | # Install packages from Brewfile 27 | echo "" 28 | echo "Installing packages from Brewfile..." 29 | brew bundle --file="$DOTFILES_DIR/Brewfile" 30 | 31 | # Install Oh My Zsh if not present 32 | if [[ ! -d "$HOME/.oh-my-zsh" ]]; then 33 | echo "" 34 | echo "Installing Oh My Zsh..." 35 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended 36 | fi 37 | 38 | # Install Powerlevel10k theme 39 | if [[ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" ]]; then 40 | echo "" 41 | echo "Installing Powerlevel10k theme..." 42 | git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" 43 | fi 44 | 45 | # Install zsh-autosuggestions plugin (inline ghost text) 46 | if [[ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions" ]]; then 47 | echo "" 48 | echo "Installing zsh-autosuggestions plugin..." 49 | git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions" 50 | fi 51 | 52 | # Install default Node version via fnm 53 | if command -v fnm &> /dev/null; then 54 | echo "" 55 | echo "Setting up fnm and installing Node..." 56 | eval "$(fnm env)" 57 | if ! fnm list | grep -q "v"; then 58 | fnm install --lts 59 | fnm default lts-latest 60 | fi 61 | fi 62 | 63 | # Backup existing dotfiles and stow 64 | echo "" 65 | echo "Stowing dotfiles..." 66 | 67 | # Function to backup and stow 68 | stow_package() { 69 | local pkg=$1 70 | echo " Stowing $pkg..." 71 | 72 | # Use stow with --adopt to handle existing files, then restore from repo 73 | cd "$DOTFILES_DIR" 74 | stow -v -t "$HOME" "$pkg" 2>/dev/null || stow -v --adopt -t "$HOME" "$pkg" 75 | 76 | # If we adopted files, restore the repo version 77 | git checkout -- "$pkg" 2>/dev/null || true 78 | } 79 | 80 | stow_package "zsh" 81 | stow_package "nvim" 82 | stow_package "git" 83 | stow_package "shell" 84 | stow_package "ghostty" 85 | 86 | 87 | # Create ~/.zshrc loader if it doesn't exist or doesn't source our config 88 | if [[ ! -f "$HOME/.zshrc" ]] || ! grep -q "zshrc.dotfiles" "$HOME/.zshrc" 2>/dev/null; then 89 | echo "" 90 | echo "Creating ~/.zshrc loader..." 91 | # Prepend our source line, keep existing content 92 | if [[ -f "$HOME/.zshrc" ]]; then 93 | existing=$(cat "$HOME/.zshrc") 94 | echo '# Source dotfiles-managed zsh config 95 | [[ -f ~/.zshrc.dotfiles ]] && source ~/.zshrc.dotfiles 96 | 97 | # ============================================ 98 | # Auto-managed by tools (gohan, installers, etc.) 99 | # ============================================ 100 | '"$existing" > "$HOME/.zshrc" 101 | else 102 | echo '# Source dotfiles-managed zsh config 103 | [[ -f ~/.zshrc.dotfiles ]] && source ~/.zshrc.dotfiles 104 | 105 | # ============================================ 106 | # Auto-managed by tools (gohan, installers, etc.) 107 | # ============================================ 108 | ' > "$HOME/.zshrc" 109 | fi 110 | fi 111 | 112 | # Generate zoxide cache 113 | echo "" 114 | echo "Generating zoxide cache..." 115 | mkdir -p ~/.cache 116 | zoxide init zsh > ~/.cache/zoxide.zsh 117 | 118 | # Configure git user (uses ~/.gitconfig.local which is included by ~/.gitconfig) 119 | echo "" 120 | echo "===================================" 121 | echo " Git Configuration" 122 | echo "===================================" 123 | current_email=$(git config --global user.email 2>/dev/null || echo "") 124 | if [[ -z "$current_email" ]]; then 125 | read -p "Enter your git email: " git_email 126 | git config -f ~/.gitconfig.local user.email "$git_email" 127 | echo "Git email set to: $git_email" 128 | else 129 | echo "Git email already configured: $current_email" 130 | fi 131 | 132 | # GPG key setup hint 133 | echo "" 134 | current_key=$(git config --global user.signingkey 2>/dev/null || echo "") 135 | if [[ -z "$current_key" ]]; then 136 | echo "GPG signing key not configured." 137 | echo "To set up GPG signing:" 138 | echo " 1. Generate a key: gpg --full-generate-key" 139 | echo " 2. List keys: gpg --list-secret-keys --keyid-format=long" 140 | echo " 3. Set key: git config -f ~/.gitconfig.local user.signingkey YOUR_KEY_ID" 141 | fi 142 | 143 | # Create local.zsh if it doesn't exist 144 | if [[ ! -f "$HOME/.zsh/local.zsh" ]]; then 145 | echo "" 146 | echo "Creating empty ~/.zsh/local.zsh for machine-specific config..." 147 | mkdir -p "$HOME/.zsh" 148 | cp "$DOTFILES_DIR/zsh/.zsh/local.zsh.example" "$HOME/.zsh/local.zsh" 149 | echo "Edit ~/.zsh/local.zsh to add machine-specific aliases and config" 150 | fi 151 | 152 | echo "" 153 | echo "===================================" 154 | echo " Installation Complete!" 155 | echo "===================================" 156 | echo "" 157 | echo "Next steps:" 158 | echo " 1. Restart your terminal or run: source ~/.zshrc" 159 | echo " 2. Edit ~/.zsh/local.zsh for machine-specific config" 160 | echo " 3. Set up GPG signing if needed (see above)" 161 | echo "" 162 | -------------------------------------------------------------------------------- /shell/.p10k.zsh: -------------------------------------------------------------------------------- 1 | # Generated by Powerlevel10k configuration wizard on 2021-06-29 at 13:02 CDT. 2 | # Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 19275. 3 | # Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 2 lines, 4 | # solid, left frame, lightest-ornaments, sparse, few icons, fluent, transient_prompt, 5 | # instant_prompt=verbose. 6 | # Type `p10k configure` to generate another config. 7 | # 8 | # Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate 9 | # your own config based on it. 10 | # 11 | # Tip: Looking for a nice color? Here's a one-liner to print colormap. 12 | # 13 | # for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done 14 | 15 | # Temporarily change options. 16 | 'builtin' 'local' '-a' 'p10k_config_opts' 17 | [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') 18 | [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') 19 | [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') 20 | 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' 21 | 22 | () { 23 | emulate -L zsh -o extended_glob 24 | 25 | # Unset all configuration options. This allows you to apply configuration changes without 26 | # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. 27 | unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' 28 | 29 | # Zsh >= 5.1 is required. 30 | autoload -Uz is-at-least && is-at-least 5.1 || return 31 | 32 | # The list of segments shown on the left. Fill it with the most important segments. 33 | typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( 34 | # =========================[ Line #1 ]========================= 35 | # os_icon # os identifier 36 | dir # current directory 37 | vcs # git status 38 | # =========================[ Line #2 ]========================= 39 | newline # \n 40 | prompt_char # prompt symbol 41 | ) 42 | 43 | # The list of segments shown on the right. Fill it with less important segments. 44 | # Right prompt on the last prompt line (where you are typing your commands) gets 45 | # automatically hidden when the input line reaches it. Right prompt above the 46 | # last prompt line gets hidden if it would overlap with left prompt. 47 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( 48 | # =========================[ Line #1 ]========================= 49 | status # exit code of the last command 50 | command_execution_time # duration of the last command 51 | background_jobs # presence of background jobs 52 | direnv # direnv status (https://direnv.net/) 53 | asdf # asdf version manager (https://github.com/asdf-vm/asdf) 54 | virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) 55 | anaconda # conda environment (https://conda.io/) 56 | pyenv # python environment (https://github.com/pyenv/pyenv) 57 | goenv # go environment (https://github.com/syndbg/goenv) 58 | nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) 59 | nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) 60 | nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) 61 | node_version # node.js version 62 | # go_version # go version (https://golang.org) 63 | # rust_version # rustc version (https://www.rust-lang.org) 64 | # dotnet_version # .NET version (https://dotnet.microsoft.com) 65 | # php_version # php version (https://www.php.net/) 66 | # laravel_version # laravel php framework version (https://laravel.com/) 67 | # java_version # java version (https://www.java.com/) 68 | # package # name@version from package.json (https://docs.npmjs.com/files/package.json) 69 | rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) 70 | rvm # ruby version from rvm (https://rvm.io) 71 | fvm # flutter version management (https://github.com/leoafarias/fvm) 72 | luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) 73 | jenv # java version from jenv (https://github.com/jenv/jenv) 74 | plenv # perl version from plenv (https://github.com/tokuhirom/plenv) 75 | phpenv # php version from phpenv (https://github.com/phpenv/phpenv) 76 | scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) 77 | haskell_stack # haskell version from stack (https://haskellstack.org/) 78 | kubecontext # current kubernetes context (https://kubernetes.io/) 79 | terraform # terraform workspace (https://www.terraform.io) 80 | aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) 81 | aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) 82 | azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) 83 | gcloud # google cloud cli account and project (https://cloud.google.com/) 84 | google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) 85 | context # user@hostname 86 | nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) 87 | ranger # ranger shell (https://github.com/ranger/ranger) 88 | nnn # nnn shell (https://github.com/jarun/nnn) 89 | xplr # xplr shell (https://github.com/sayanarijit/xplr) 90 | vim_shell # vim shell indicator (:sh) 91 | midnight_commander # midnight commander shell (https://midnight-commander.org/) 92 | nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 93 | # vpn_ip # virtual private network indicator 94 | # load # CPU load 95 | # disk_usage # disk usage 96 | # ram # free RAM 97 | # swap # used swap 98 | todo # todo items (https://github.com/todotxt/todo.txt-cli) 99 | timewarrior # timewarrior tracking status (https://timewarrior.net/) 100 | taskwarrior # taskwarrior task count (https://taskwarrior.org/) 101 | # time # current time 102 | # =========================[ Line #2 ]========================= 103 | newline 104 | # ip # ip address and bandwidth usage for a specified network interface 105 | # public_ip # public IP address 106 | # proxy # system-wide http/https/ftp proxy 107 | # battery # internal battery 108 | # wifi # wifi speed 109 | # example # example user-defined segment (see prompt_example function below) 110 | ) 111 | 112 | # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. 113 | typeset -g POWERLEVEL9K_MODE=nerdfont-complete 114 | # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid 115 | # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. 116 | typeset -g POWERLEVEL9K_ICON_PADDING=none 117 | 118 | # Basic style options that define the overall look of your prompt. You probably don't want to 119 | # change them. 120 | typeset -g POWERLEVEL9K_BACKGROUND= # transparent background 121 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace 122 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space 123 | typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol 124 | 125 | # When set to true, icons appear before content on both sides of the prompt. When set 126 | # to false, icons go after content. If empty or not set, icons go before content in the left 127 | # prompt and after content in the right prompt. 128 | # 129 | # You can also override it for a specific segment: 130 | # 131 | # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false 132 | # 133 | # Or for a specific segment in specific state: 134 | # 135 | # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false 136 | typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true 137 | 138 | # Add an empty line before each prompt. 139 | typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true 140 | 141 | # Connect left prompt lines with these symbols. 142 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%244F╭─' 143 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%244F├─' 144 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%244F╰─' 145 | # Connect right prompt lines with these symbols. 146 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= 147 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= 148 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= 149 | 150 | # The left end of left prompt. 151 | typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' 152 | # The right end of right prompt. 153 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= 154 | 155 | # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll 156 | # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and 157 | # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. 158 | typeset -g POWERLEVEL9K_SHOW_RULER=false 159 | typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' 160 | typeset -g POWERLEVEL9K_RULER_FOREGROUND=244 161 | 162 | # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' 163 | # to make it easier to see the alignment between left and right prompt and to separate prompt 164 | # from command output. It serves the same purpose as ruler (see above) without increasing 165 | # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false 166 | # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact 167 | # prompt. 168 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='─' 169 | if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then 170 | # The color of the filler. 171 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=244 172 | # Add a space between the end of left prompt and the filler. 173 | typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' 174 | # Add a space between the filler and the start of right prompt. 175 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' 176 | # Start filler from the edge of the screen if there are no left segments on the first line. 177 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' 178 | # End filler on the edge of the screen if there are no right segments on the first line. 179 | typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' 180 | fi 181 | 182 | #################################[ os_icon: os identifier ]################################## 183 | # OS identifier color. 184 | typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= 185 | # Custom icon. 186 | # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' 187 | 188 | ################################[ prompt_char: prompt symbol ]################################ 189 | # Green prompt symbol if the last command succeeded. 190 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 191 | # Red prompt symbol if the last command failed. 192 | typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 193 | # Default prompt symbol. 194 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' 195 | # Prompt symbol in command vi mode. 196 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' 197 | # Prompt symbol in visual vi mode. 198 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' 199 | # Prompt symbol in overwrite vi mode. 200 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' 201 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true 202 | # No line terminator if prompt_char is the last segment. 203 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' 204 | # No line introducer if prompt_char is the first segment. 205 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= 206 | 207 | ##################################[ dir: current directory ]################################## 208 | # Default current directory color. 209 | typeset -g POWERLEVEL9K_DIR_FOREGROUND=31 210 | # If directory is too long, shorten some of its segments to the shortest possible unique 211 | # prefix. The shortened directory can be tab-completed to the original. 212 | typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique 213 | # Replace removed segment suffixes with this symbol. 214 | typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= 215 | # Color of the shortened directory segments. 216 | typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 217 | # Color of the anchor directory segments. Anchor segments are never shortened. The first 218 | # segment is always an anchor. 219 | typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 220 | # Display anchor directory segments in bold. 221 | typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true 222 | # Don't shorten directories that contain any of these files. They are anchors. 223 | local anchor_files=( 224 | .bzr 225 | .citc 226 | .git 227 | .hg 228 | .node-version 229 | .python-version 230 | .go-version 231 | .ruby-version 232 | .lua-version 233 | .java-version 234 | .perl-version 235 | .php-version 236 | .tool-version 237 | .shorten_folder_marker 238 | .svn 239 | .terraform 240 | CVS 241 | Cargo.toml 242 | composer.json 243 | go.mod 244 | package.json 245 | stack.yaml 246 | ) 247 | typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" 248 | # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains 249 | # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is 250 | # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) 251 | # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers 252 | # and other directories don't. 253 | # 254 | # Optionally, "first" and "last" can be followed by ":" where is an integer. 255 | # This moves the truncation point to the right (positive offset) or to the left (negative offset) 256 | # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" 257 | # respectively. 258 | typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false 259 | # Don't shorten this many last directory segments. They are anchors. 260 | typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 261 | # Shorten directory if it's longer than this even if there is space for it. The value can 262 | # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, 263 | # directory will be shortened only when prompt doesn't fit or when other parameters demand it 264 | # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). 265 | # If set to `0`, directory will always be shortened to its minimum length. 266 | typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 267 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this 268 | # many columns for typing commands. 269 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 270 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least 271 | # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. 272 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 273 | # If set to true, embed a hyperlink into the directory. Useful for quickly 274 | # opening a directory in the file manager simply by clicking the link. 275 | # Can also be handy when the directory is shortened, as it allows you to see 276 | # the full directory that was used in previous commands. 277 | typeset -g POWERLEVEL9K_DIR_HYPERLINK=false 278 | 279 | # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON 280 | # and POWERLEVEL9K_DIR_CLASSES below. 281 | typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 282 | 283 | # The default icon shown next to non-writable and non-existent directories when 284 | # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. 285 | # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' 286 | 287 | # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different 288 | # directories. It must be an array with 3 * N elements. Each triplet consists of: 289 | # 290 | # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with 291 | # extended_glob option enabled. 292 | # 2. Directory class for the purpose of styling. 293 | # 3. An empty string. 294 | # 295 | # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. 296 | # 297 | # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories 298 | # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. 299 | # 300 | # For example, given these settings: 301 | # 302 | # typeset -g POWERLEVEL9K_DIR_CLASSES=( 303 | # '~/work(|/*)' WORK '' 304 | # '~(|/*)' HOME '' 305 | # '*' DEFAULT '') 306 | # 307 | # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one 308 | # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or 309 | # WORK_NON_EXISTENT. 310 | # 311 | # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an 312 | # option to define custom colors and icons for different directory classes. 313 | # 314 | # # Styling for WORK. 315 | # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' 316 | # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 317 | # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 318 | # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 319 | # 320 | # # Styling for WORK_NOT_WRITABLE. 321 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 322 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 323 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 324 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 325 | # 326 | # # Styling for WORK_NON_EXISTENT. 327 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' 328 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31 329 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103 330 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39 331 | # 332 | # If a styling parameter isn't explicitly defined for some class, it falls back to the classless 333 | # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls 334 | # back to POWERLEVEL9K_DIR_FOREGROUND. 335 | # 336 | typeset -g POWERLEVEL9K_DIR_CLASSES=() 337 | 338 | # Custom prefix. 339 | # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' 340 | 341 | #####################################[ vcs: git status ]###################################### 342 | # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. 343 | typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' 344 | 345 | # Untracked files icon. It's really a question mark, your font isn't broken. 346 | # Change the value of this parameter to show a different icon. 347 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' 348 | 349 | # Formatter for Git status. 350 | # 351 | # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. 352 | # 353 | # You can edit the function to customize how Git status looks. 354 | # 355 | # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: 356 | # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. 357 | function my_git_formatter() { 358 | emulate -L zsh 359 | 360 | if [[ -n $P9K_CONTENT ]]; then 361 | # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from 362 | # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. 363 | typeset -g my_git_format=$P9K_CONTENT 364 | return 365 | fi 366 | 367 | if (( $1 )); then 368 | # Styling for up-to-date Git status. 369 | local meta='%f' # default foreground 370 | local clean='%76F' # green foreground 371 | local modified='%178F' # yellow foreground 372 | local untracked='%39F' # blue foreground 373 | local conflicted='%196F' # red foreground 374 | else 375 | # Styling for incomplete and stale Git status. 376 | local meta='%244F' # grey foreground 377 | local clean='%244F' # grey foreground 378 | local modified='%244F' # grey foreground 379 | local untracked='%244F' # grey foreground 380 | local conflicted='%244F' # grey foreground 381 | fi 382 | 383 | local res 384 | 385 | if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then 386 | local branch=${(V)VCS_STATUS_LOCAL_BRANCH} 387 | # If local branch name is at most 32 characters long, show it in full. 388 | # Otherwise show the first 12 … the last 12. 389 | # Tip: To always show local branch name in full without truncation, delete the next line. 390 | (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line 391 | res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" 392 | fi 393 | 394 | if [[ -n $VCS_STATUS_TAG 395 | # Show tag only if not on a branch. 396 | # Tip: To always show tag, delete the next line. 397 | && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line 398 | ]]; then 399 | local tag=${(V)VCS_STATUS_TAG} 400 | # If tag name is at most 32 characters long, show it in full. 401 | # Otherwise show the first 12 … the last 12. 402 | # Tip: To always show tag name in full without truncation, delete the next line. 403 | (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line 404 | res+="${meta}#${clean}${tag//\%/%%}" 405 | fi 406 | 407 | # Display the current Git commit if there is no branch and no tag. 408 | # Tip: To always display the current Git commit, delete the next line. 409 | [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line 410 | res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" 411 | 412 | # Show tracking branch name if it differs from local branch. 413 | if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then 414 | res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" 415 | fi 416 | 417 | # Display "wip" if the latest commit's summary contains "wip" or "WIP". 418 | if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then 419 | res+=" ${modified}wip" 420 | fi 421 | 422 | # ⇣42 if behind the remote. 423 | (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" 424 | # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. 425 | (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " 426 | (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" 427 | # ⇠42 if behind the push remote. 428 | (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" 429 | (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " 430 | # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. 431 | (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" 432 | # *42 if have stashes. 433 | (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" 434 | # 'merge' if the repo is in an unusual state. 435 | [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" 436 | # ~42 if have merge conflicts. 437 | (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" 438 | # +42 if have staged changes. 439 | (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" 440 | # !42 if have unstaged changes. 441 | (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" 442 | # ?42 if have untracked files. It's really a question mark, your font isn't broken. 443 | # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. 444 | # Remove the next line if you don't want to see untracked files at all. 445 | (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" 446 | # "─" if the number of unstaged files is unknown. This can happen due to 447 | # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower 448 | # than the number of files in the Git index, or due to bash.showDirtyState being set to false 449 | # in the repository config. The number of staged and untracked files may also be unknown 450 | # in this case. 451 | (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" 452 | 453 | typeset -g my_git_format=$res 454 | } 455 | functions -M my_git_formatter 2>/dev/null 456 | 457 | # Don't count the number of unstaged, untracked and conflicted files in Git repositories with 458 | # more than this many files in the index. Negative value means infinity. 459 | # 460 | # If you are working in Git repositories with tens of millions of files and seeing performance 461 | # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output 462 | # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's 463 | # config: `git config bash.showDirtyState false`. 464 | typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 465 | 466 | # Don't show Git status in prompt for repositories whose workdir matches this pattern. 467 | # For example, if set to '~', the Git repository at $HOME/.git will be ignored. 468 | # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. 469 | typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' 470 | 471 | # Disable the default Git status formatting. 472 | typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true 473 | # Install our own Git status formatter. 474 | typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' 475 | typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' 476 | # Enable counters for staged, unstaged, etc. 477 | typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 478 | 479 | # Icon color. 480 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 481 | typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 482 | # Custom icon. 483 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= 484 | # Custom prefix. 485 | typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' 486 | 487 | # Show status of repositories of these types. You can add svn and/or hg if you are 488 | # using them. If you do, your prompt may become slow even when your current directory 489 | # isn't in an svn or hg reposotiry. 490 | typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) 491 | 492 | # These settings are used for repositories other than Git or when gitstatusd fails and 493 | # Powerlevel10k has to fall back to using vcs_info. 494 | typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 495 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 496 | typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 497 | 498 | ##########################[ status: exit code of the last command ]########################### 499 | # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and 500 | # style them independently from the regular OK and ERROR state. 501 | typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true 502 | 503 | # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as 504 | # it will signify success by turning green. 505 | typeset -g POWERLEVEL9K_STATUS_OK=false 506 | typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 507 | typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' 508 | 509 | # Status when some part of a pipe command fails but the overall exit status is zero. It may look 510 | # like this: 1|0. 511 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true 512 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 513 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' 514 | 515 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as 516 | # it will signify error by turning red. 517 | typeset -g POWERLEVEL9K_STATUS_ERROR=false 518 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 519 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' 520 | 521 | # Status when the last command was terminated by a signal. 522 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true 523 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 524 | # Use terse signal names: "INT" instead of "SIGINT(2)". 525 | typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false 526 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' 527 | 528 | # Status when some part of a pipe command fails and the overall exit status is also non-zero. 529 | # It may look like this: 1|0. 530 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true 531 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 532 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' 533 | 534 | ###################[ command_execution_time: duration of the last command ]################### 535 | # Show duration of the last command if takes at least this many seconds. 536 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 537 | # Show this many fractional digits. Zero means round to seconds. 538 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 539 | # Execution time color. 540 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 541 | # Duration format: 1d 2h 3m 4s. 542 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' 543 | # Custom icon. 544 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= 545 | # Custom prefix. 546 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' 547 | 548 | #######################[ background_jobs: presence of background jobs ]####################### 549 | # Don't show the number of background jobs. 550 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false 551 | # Background jobs color. 552 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 553 | # Custom icon. 554 | # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' 555 | 556 | #######################[ direnv: direnv status (https://direnv.net/) ]######################## 557 | # Direnv color. 558 | typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 559 | # Custom icon. 560 | # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 561 | 562 | ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### 563 | # Default asdf color. Only used to display tools for which there is no color override (see below). 564 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. 565 | typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 566 | 567 | # There are four parameters that can be used to hide asdf tools. Each parameter describes 568 | # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at 569 | # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to 570 | # hide a tool, it gets shown. 571 | # 572 | # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and 573 | # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: 574 | # 575 | # asdf local python 3.8.1 576 | # asdf global python 3.8.1 577 | # 578 | # After running both commands the current python version is 3.8.1 and its source is "local" as 579 | # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, 580 | # it'll hide python version in this case because 3.8.1 is the same as the global version. 581 | # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't 582 | # contain "local". 583 | 584 | # Hide tool versions that don't come from one of these sources. 585 | # 586 | # Available sources: 587 | # 588 | # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" 589 | # - local `asdf current` says "set by /some/not/home/directory/file" 590 | # - global `asdf current` says "set by /home/username/file" 591 | # 592 | # Note: If this parameter is set to (shell local global), it won't hide tools. 593 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. 594 | typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) 595 | 596 | # If set to false, hide tool versions that are the same as global. 597 | # 598 | # Note: The name of this parameter doesn't reflect its meaning at all. 599 | # Note: If this parameter is set to true, it won't hide tools. 600 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. 601 | typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false 602 | 603 | # If set to false, hide tool versions that are equal to "system". 604 | # 605 | # Note: If this parameter is set to true, it won't hide tools. 606 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. 607 | typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true 608 | 609 | # If set to non-empty value, hide tools unless there is a file matching the specified file pattern 610 | # in the current directory, or its parent directory, or its grandparent directory, and so on. 611 | # 612 | # Note: If this parameter is set to empty value, it won't hide tools. 613 | # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. 614 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. 615 | # 616 | # Example: Hide nodejs version when there is no package.json and no *.js files in the current 617 | # directory, in `..`, in `../..` and so on. 618 | # 619 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' 620 | typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= 621 | 622 | # Ruby version from asdf. 623 | typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 624 | # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' 625 | # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' 626 | 627 | # Python version from asdf. 628 | typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 629 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' 630 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' 631 | 632 | # Go version from asdf. 633 | typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 634 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 635 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 636 | 637 | # Node.js version from asdf. 638 | typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 639 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' 640 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' 641 | 642 | # Rust version from asdf. 643 | typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 644 | # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' 645 | # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' 646 | 647 | # .NET Core version from asdf. 648 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 649 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' 650 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' 651 | 652 | # Flutter version from asdf. 653 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 654 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' 655 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' 656 | 657 | # Lua version from asdf. 658 | typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 659 | # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' 660 | # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' 661 | 662 | # Java version from asdf. 663 | typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 664 | # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' 665 | # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' 666 | 667 | # Perl version from asdf. 668 | typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 669 | # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' 670 | # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' 671 | 672 | # Erlang version from asdf. 673 | typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 674 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 675 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 676 | 677 | # Elixir version from asdf. 678 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 679 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' 680 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' 681 | 682 | # Postgres version from asdf. 683 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 684 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' 685 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' 686 | 687 | # PHP version from asdf. 688 | typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 689 | # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' 690 | # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' 691 | 692 | # Haskell version from asdf. 693 | typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 694 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 695 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' 696 | 697 | # Julia version from asdf. 698 | typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 699 | # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' 700 | # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' 701 | 702 | ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### 703 | # NordVPN connection indicator color. 704 | typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 705 | # Hide NordVPN connection indicator when not connected. 706 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= 707 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= 708 | # Custom icon. 709 | # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' 710 | 711 | #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## 712 | # Ranger shell color. 713 | typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 714 | # Custom icon. 715 | # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' 716 | 717 | ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### 718 | # Nnn shell color. 719 | typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 720 | # Custom icon. 721 | # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' 722 | 723 | ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## 724 | # xplr shell color. 725 | typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72 726 | # Custom icon. 727 | # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' 728 | 729 | ###########################[ vim_shell: vim shell indicator (:sh) ]########################### 730 | # Vim shell indicator color. 731 | typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 732 | # Custom icon. 733 | # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 734 | 735 | ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### 736 | # Midnight Commander shell color. 737 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 738 | # Custom icon. 739 | # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' 740 | 741 | #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## 742 | # Nix shell color. 743 | typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 744 | 745 | # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. 746 | # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= 747 | 748 | # Custom icon. 749 | # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 750 | 751 | ##################################[ disk_usage: disk usage ]################################## 752 | # Colors for different levels of disk usage. 753 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 754 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 755 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 756 | # Thresholds for different levels of disk usage (percentage points). 757 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 758 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 759 | # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. 760 | typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false 761 | # Custom icon. 762 | # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 763 | 764 | ######################################[ ram: free RAM ]####################################### 765 | # RAM color. 766 | typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 767 | # Custom icon. 768 | # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' 769 | 770 | #####################################[ swap: used swap ]###################################### 771 | # Swap color. 772 | typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 773 | # Custom icon. 774 | # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' 775 | 776 | ######################################[ load: CPU load ]###################################### 777 | # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. 778 | typeset -g POWERLEVEL9K_LOAD_WHICH=5 779 | # Load color when load is under 50%. 780 | typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 781 | # Load color when load is between 50% and 70%. 782 | typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 783 | # Load color when load is over 70%. 784 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 785 | # Custom icon. 786 | # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' 787 | 788 | ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ 789 | # Todo color. 790 | typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 791 | # Hide todo when the total number of tasks is zero. 792 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true 793 | # Hide todo when the number of tasks after filtering is zero. 794 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false 795 | 796 | # Todo format. The following parameters are available within the expansion. 797 | # 798 | # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. 799 | # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. 800 | # 801 | # These variables correspond to the last line of the output of `todo.sh -p ls`: 802 | # 803 | # TODO: 24 of 42 tasks shown 804 | # 805 | # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. 806 | # 807 | # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' 808 | 809 | # Custom icon. 810 | # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' 811 | 812 | ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ 813 | # Timewarrior color. 814 | typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 815 | # If the tracked task is longer than 24 characters, truncate and append "…". 816 | # Tip: To always display tasks without truncation, delete the following parameter. 817 | # Tip: To hide task names and display just the icon when time tracking is enabled, set the 818 | # value of the following parameter to "". 819 | typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' 820 | 821 | # Custom icon. 822 | # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 823 | 824 | ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## 825 | # Taskwarrior color. 826 | typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 827 | 828 | # Taskwarrior segment format. The following parameters are available within the expansion. 829 | # 830 | # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. 831 | # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. 832 | # 833 | # Zero values are represented as empty parameters. 834 | # 835 | # The default format: 836 | # 837 | # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' 838 | # 839 | # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' 840 | 841 | # Custom icon. 842 | # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 843 | 844 | ##################################[ context: user@hostname ]################################## 845 | # Context color when running with privileges. 846 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 847 | # Context color in SSH without privileges. 848 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 849 | # Default context color (no privileges, no SSH). 850 | typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 851 | 852 | # Context format when running with privileges: bold user@hostname. 853 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' 854 | # Context format when in SSH without privileges: user@hostname. 855 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' 856 | # Default context format (no privileges, no SSH): user@hostname. 857 | typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' 858 | 859 | # Don't show context unless running with privileges or in SSH. 860 | # Tip: Remove the next line to always show context. 861 | typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= 862 | 863 | # Custom icon. 864 | # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' 865 | # Custom prefix. 866 | typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' 867 | 868 | ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### 869 | # Python virtual environment color. 870 | typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 871 | # Don't show Python version next to the virtual environment name. 872 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false 873 | # If set to "false", won't show virtualenv if pyenv is already shown. 874 | # If set to "if-different", won't show virtualenv if it's the same as pyenv. 875 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false 876 | # Separate environment name from Python version only with a space. 877 | typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= 878 | # Custom icon. 879 | # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 880 | 881 | #####################[ anaconda: conda environment (https://conda.io/) ]###################### 882 | # Anaconda environment color. 883 | typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 884 | 885 | # Anaconda segment format. The following parameters are available within the expansion. 886 | # 887 | # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. 888 | # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. 889 | # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). 890 | # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). 891 | # 892 | # CONDA_PROMPT_MODIFIER can be configured with the following command: 893 | # 894 | # conda config --set env_prompt '({default_env}) ' 895 | # 896 | # The last argument is a Python format string that can use the following variables: 897 | # 898 | # - prefix The same as CONDA_PREFIX. 899 | # - default_env The same as CONDA_DEFAULT_ENV. 900 | # - name The last segment of CONDA_PREFIX. 901 | # - stacked_env Comma-separated list of names in the environment stack. The first element is 902 | # always the same as default_env. 903 | # 904 | # Note: '({default_env}) ' is the default value of env_prompt. 905 | # 906 | # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER 907 | # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former 908 | # is empty. 909 | typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' 910 | 911 | # Custom icon. 912 | # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' 913 | 914 | ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ 915 | # Pyenv color. 916 | typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 917 | # Hide python version if it doesn't come from one of these sources. 918 | typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) 919 | # If set to false, hide python version if it's the same as global: 920 | # $(pyenv version-name) == $(pyenv global). 921 | typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false 922 | # If set to false, hide python version if it's equal to "system". 923 | typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true 924 | 925 | # Pyenv segment format. The following parameters are available within the expansion. 926 | # 927 | # - P9K_CONTENT Current pyenv environment (pyenv version-name). 928 | # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). 929 | # 930 | # The default format has the following logic: 931 | # 932 | # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or 933 | # starts with "$P9K_PYENV_PYTHON_VERSION/". 934 | # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". 935 | typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' 936 | 937 | # Custom icon. 938 | # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 939 | 940 | ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ 941 | # Goenv color. 942 | typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 943 | # Hide go version if it doesn't come from one of these sources. 944 | typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) 945 | # If set to false, hide go version if it's the same as global: 946 | # $(goenv version-name) == $(goenv global). 947 | typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false 948 | # If set to false, hide go version if it's equal to "system". 949 | typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true 950 | # Custom icon. 951 | # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 952 | 953 | ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## 954 | # Nodenv color. 955 | typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 956 | # Hide node version if it doesn't come from one of these sources. 957 | typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) 958 | # If set to false, hide node version if it's the same as global: 959 | # $(nodenv version-name) == $(nodenv global). 960 | typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false 961 | # If set to false, hide node version if it's equal to "system". 962 | typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true 963 | # Custom icon. 964 | # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 965 | 966 | ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### 967 | # Nvm color. 968 | typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 969 | # Custom icon. 970 | # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 971 | 972 | ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ 973 | # Nodeenv color. 974 | typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 975 | # Don't show Node version next to the environment name. 976 | typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false 977 | # Separate environment name from Node version only with a space. 978 | typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= 979 | # Custom icon. 980 | # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 981 | 982 | ##############################[ node_version: node.js version ]############################### 983 | # Node version color. 984 | typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 985 | # Show node version only when in a directory tree containing package.json. 986 | typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true 987 | # Custom icon. 988 | # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 989 | 990 | #######################[ go_version: go version (https://golang.org) ]######################## 991 | # Go version color. 992 | typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 993 | # Show go version only when in a go project subdirectory. 994 | typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true 995 | # Custom icon. 996 | # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 997 | 998 | #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## 999 | # Rust version color. 1000 | typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 1001 | # Show rust version only when in a rust project subdirectory. 1002 | typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true 1003 | # Custom icon. 1004 | # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1005 | 1006 | ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ 1007 | # .NET version color. 1008 | typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 1009 | # Show .NET version only when in a .NET project subdirectory. 1010 | typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true 1011 | # Custom icon. 1012 | # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1013 | 1014 | #####################[ php_version: php version (https://www.php.net/) ]###################### 1015 | # PHP version color. 1016 | typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 1017 | # Show PHP version only when in a PHP project subdirectory. 1018 | typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true 1019 | # Custom icon. 1020 | # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1021 | 1022 | ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### 1023 | # Laravel version color. 1024 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 1025 | # Custom icon. 1026 | # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1027 | 1028 | ####################[ java_version: java version (https://www.java.com/) ]#################### 1029 | # Java version color. 1030 | typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 1031 | # Show java version only when in a java project subdirectory. 1032 | typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true 1033 | # Show brief version. 1034 | typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false 1035 | # Custom icon. 1036 | # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1037 | 1038 | ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### 1039 | # Package color. 1040 | typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 1041 | # Package format. The following parameters are available within the expansion. 1042 | # 1043 | # - P9K_PACKAGE_NAME The value of `name` field in package.json. 1044 | # - P9K_PACKAGE_VERSION The value of `version` field in package.json. 1045 | # 1046 | # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' 1047 | # Custom icon. 1048 | # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1049 | 1050 | #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## 1051 | # Rbenv color. 1052 | typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 1053 | # Hide ruby version if it doesn't come from one of these sources. 1054 | typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) 1055 | # If set to false, hide ruby version if it's the same as global: 1056 | # $(rbenv version-name) == $(rbenv global). 1057 | typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false 1058 | # If set to false, hide ruby version if it's equal to "system". 1059 | typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true 1060 | # Custom icon. 1061 | # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1062 | 1063 | #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## 1064 | # Rvm color. 1065 | typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 1066 | # Don't show @gemset at the end. 1067 | typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false 1068 | # Don't show ruby- at the front. 1069 | typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false 1070 | # Custom icon. 1071 | # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1072 | 1073 | ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ 1074 | # Fvm color. 1075 | typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 1076 | # Custom icon. 1077 | # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1078 | 1079 | ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### 1080 | # Lua color. 1081 | typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 1082 | # Hide lua version if it doesn't come from one of these sources. 1083 | typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) 1084 | # If set to false, hide lua version if it's the same as global: 1085 | # $(luaenv version-name) == $(luaenv global). 1086 | typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false 1087 | # If set to false, hide lua version if it's equal to "system". 1088 | typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true 1089 | # Custom icon. 1090 | # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1091 | 1092 | ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ 1093 | # Java color. 1094 | typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 1095 | # Hide java version if it doesn't come from one of these sources. 1096 | typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) 1097 | # If set to false, hide java version if it's the same as global: 1098 | # $(jenv version-name) == $(jenv global). 1099 | typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false 1100 | # If set to false, hide java version if it's equal to "system". 1101 | typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true 1102 | # Custom icon. 1103 | # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1104 | 1105 | ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ 1106 | # Perl color. 1107 | typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 1108 | # Hide perl version if it doesn't come from one of these sources. 1109 | typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) 1110 | # If set to false, hide perl version if it's the same as global: 1111 | # $(plenv version-name) == $(plenv global). 1112 | typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false 1113 | # If set to false, hide perl version if it's equal to "system". 1114 | typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true 1115 | # Custom icon. 1116 | # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1117 | 1118 | ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ 1119 | # PHP color. 1120 | typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 1121 | # Hide php version if it doesn't come from one of these sources. 1122 | typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) 1123 | # If set to false, hide php version if it's the same as global: 1124 | # $(phpenv version-name) == $(phpenv global). 1125 | typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false 1126 | # If set to false, hide php version if it's equal to "system". 1127 | typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true 1128 | # Custom icon. 1129 | # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1130 | 1131 | #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### 1132 | # Scala color. 1133 | typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 1134 | # Hide scala version if it doesn't come from one of these sources. 1135 | typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) 1136 | # If set to false, hide scala version if it's the same as global: 1137 | # $(scalaenv version-name) == $(scalaenv global). 1138 | typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false 1139 | # If set to false, hide scala version if it's equal to "system". 1140 | typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true 1141 | # Custom icon. 1142 | # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1143 | 1144 | ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### 1145 | # Haskell color. 1146 | typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 1147 | # Hide haskell version if it doesn't come from one of these sources. 1148 | # 1149 | # shell: version is set by STACK_YAML 1150 | # local: version is set by stack.yaml up the directory tree 1151 | # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) 1152 | typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) 1153 | # If set to false, hide haskell version if it's the same as in the implicit global project. 1154 | typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true 1155 | # Custom icon. 1156 | # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' 1157 | 1158 | #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# 1159 | # Show kubecontext only when the the command you are typing invokes one of these tools. 1160 | # Tip: Remove the next line to always show kubecontext. 1161 | typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|fluxctl|stern' 1162 | 1163 | # Kubernetes context classes for the purpose of using different colors, icons and expansions with 1164 | # different contexts. 1165 | # 1166 | # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element 1167 | # in each pair defines a pattern against which the current kubernetes context gets matched. 1168 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1169 | # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, 1170 | # you'll see this value in your prompt. The second element of each pair in 1171 | # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The 1172 | # first match wins. 1173 | # 1174 | # For example, given these settings: 1175 | # 1176 | # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1177 | # '*prod*' PROD 1178 | # '*test*' TEST 1179 | # '*' DEFAULT) 1180 | # 1181 | # If your current kubernetes context is "deathray-testing/default", its class is TEST 1182 | # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. 1183 | # 1184 | # You can define different colors, icons and content expansions for different classes: 1185 | # 1186 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 1187 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1188 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1189 | typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1190 | # '*prod*' PROD # These values are examples that are unlikely 1191 | # '*test*' TEST # to match your needs. Customize them as needed. 1192 | '*' DEFAULT) 1193 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 1194 | # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1195 | 1196 | # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext 1197 | # segment. Parameter expansions are very flexible and fast, too. See reference: 1198 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1199 | # 1200 | # Within the expansion the following parameters are always available: 1201 | # 1202 | # - P9K_CONTENT The content that would've been displayed if there was no content 1203 | # expansion defined. 1204 | # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the 1205 | # output of `kubectl config get-contexts`. 1206 | # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the 1207 | # output of `kubectl config get-contexts`. 1208 | # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE 1209 | # in the output of `kubectl config get-contexts`. If there is no 1210 | # namespace, the parameter is set to "default". 1211 | # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the 1212 | # output of `kubectl config get-contexts`. 1213 | # 1214 | # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), 1215 | # the following extra parameters are available: 1216 | # 1217 | # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". 1218 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. 1219 | # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. 1220 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. 1221 | # 1222 | # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, 1223 | # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": 1224 | # 1225 | # - P9K_KUBECONTEXT_CLOUD_NAME=gke 1226 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account 1227 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a 1228 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1229 | # 1230 | # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": 1231 | # 1232 | # - P9K_KUBECONTEXT_CLOUD_NAME=eks 1233 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 1234 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 1235 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1236 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= 1237 | # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. 1238 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' 1239 | # Append the current context's namespace if it's not "default". 1240 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' 1241 | 1242 | # Custom prefix. 1243 | typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' 1244 | 1245 | ################[ terraform: terraform workspace (https://www.terraform.io) ]################# 1246 | # Don't show terraform workspace if it's literally "default". 1247 | typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false 1248 | # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element 1249 | # in each pair defines a pattern against which the current terraform workspace gets matched. 1250 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1251 | # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, 1252 | # you'll see this value in your prompt. The second element of each pair in 1253 | # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The 1254 | # first match wins. 1255 | # 1256 | # For example, given these settings: 1257 | # 1258 | # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1259 | # '*prod*' PROD 1260 | # '*test*' TEST 1261 | # '*' OTHER) 1262 | # 1263 | # If your current terraform workspace is "project_test", its class is TEST because "project_test" 1264 | # doesn't match the pattern '*prod*' but does match '*test*'. 1265 | # 1266 | # You can define different colors, icons and content expansions for different classes: 1267 | # 1268 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 1269 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1270 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1271 | typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1272 | # '*prod*' PROD # These values are examples that are unlikely 1273 | # '*test*' TEST # to match your needs. Customize them as needed. 1274 | '*' OTHER) 1275 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 1276 | # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' 1277 | 1278 | #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# 1279 | # Show aws only when the the command you are typing invokes one of these tools. 1280 | # Tip: Remove the next line to always show aws. 1281 | typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' 1282 | 1283 | # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element 1284 | # in each pair defines a pattern against which the current AWS profile gets matched. 1285 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1286 | # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, 1287 | # you'll see this value in your prompt. The second element of each pair in 1288 | # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The 1289 | # first match wins. 1290 | # 1291 | # For example, given these settings: 1292 | # 1293 | # typeset -g POWERLEVEL9K_AWS_CLASSES=( 1294 | # '*prod*' PROD 1295 | # '*test*' TEST 1296 | # '*' DEFAULT) 1297 | # 1298 | # If your current AWS profile is "company_test", its class is TEST 1299 | # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. 1300 | # 1301 | # You can define different colors, icons and content expansions for different classes: 1302 | # 1303 | # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 1304 | # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1305 | # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1306 | typeset -g POWERLEVEL9K_AWS_CLASSES=( 1307 | # '*prod*' PROD # These values are examples that are unlikely 1308 | # '*test*' TEST # to match your needs. Customize them as needed. 1309 | '*' DEFAULT) 1310 | typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 1311 | # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1312 | 1313 | # AWS segment format. The following parameters are available within the expansion. 1314 | # 1315 | # - P9K_AWS_PROFILE The name of the current AWS profile. 1316 | # - P9K_AWS_REGION The region associated with the current AWS profile. 1317 | typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' 1318 | 1319 | #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# 1320 | # AWS Elastic Beanstalk environment color. 1321 | typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 1322 | # Custom icon. 1323 | # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1324 | 1325 | ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## 1326 | # Show azure only when the the command you are typing invokes one of these tools. 1327 | # Tip: Remove the next line to always show azure. 1328 | typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 1329 | # Azure account name color. 1330 | typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 1331 | # Custom icon. 1332 | # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1333 | 1334 | ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### 1335 | # Show gcloud only when the the command you are typing invokes one of these tools. 1336 | # Tip: Remove the next line to always show gcloud. 1337 | typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' 1338 | # Google cloud color. 1339 | typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 1340 | 1341 | # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or 1342 | # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative 1343 | # enough. You can use the following parameters in the expansions. Each of them corresponds to the 1344 | # output of `gcloud` tool. 1345 | # 1346 | # Parameter | Source 1347 | # -------------------------|-------------------------------------------------------------------- 1348 | # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' 1349 | # P9K_GCLOUD_ACCOUNT | gcloud config get-value account 1350 | # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project 1351 | # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' 1352 | # 1353 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. 1354 | # 1355 | # Obtaining project name requires sending a request to Google servers. This can take a long time 1356 | # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud 1357 | # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets 1358 | # set and gcloud prompt segment transitions to state COMPLETE. 1359 | # 1360 | # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL 1361 | # and COMPLETE. You can also hide gcloud in state PARTIAL by setting 1362 | # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and 1363 | # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. 1364 | typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' 1365 | typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' 1366 | 1367 | # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name 1368 | # this often. Negative value disables periodic polling. In this mode project name is retrieved 1369 | # only when the current configuration, account or project id changes. 1370 | typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 1371 | 1372 | # Custom icon. 1373 | # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' 1374 | 1375 | #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# 1376 | # Show google_app_cred only when the the command you are typing invokes one of these tools. 1377 | # Tip: Remove the next line to always show google_app_cred. 1378 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' 1379 | 1380 | # Google application credentials classes for the purpose of using different colors, icons and 1381 | # expansions with different credentials. 1382 | # 1383 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first 1384 | # element in each pair defines a pattern against which the current kubernetes context gets 1385 | # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion 1386 | # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION 1387 | # parameters, you'll see this value in your prompt. The second element of each pair in 1388 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. 1389 | # The first match wins. 1390 | # 1391 | # For example, given these settings: 1392 | # 1393 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1394 | # '*:*prod*:*' PROD 1395 | # '*:*test*:*' TEST 1396 | # '*' DEFAULT) 1397 | # 1398 | # If your current Google application credentials is "service_account deathray-testing x@y.com", 1399 | # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. 1400 | # 1401 | # You can define different colors, icons and content expansions for different classes: 1402 | # 1403 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 1404 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1405 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' 1406 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1407 | # '*:*prod*:*' PROD # These values are examples that are unlikely 1408 | # '*:*test*:*' TEST # to match your needs. Customize them as needed. 1409 | '*' DEFAULT) 1410 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 1411 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1412 | 1413 | # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by 1414 | # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: 1415 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1416 | # 1417 | # You can use the following parameters in the expansion. Each of them corresponds to one of the 1418 | # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. 1419 | # 1420 | # Parameter | JSON key file field 1421 | # ---------------------------------+--------------- 1422 | # P9K_GOOGLE_APP_CRED_TYPE | type 1423 | # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id 1424 | # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email 1425 | # 1426 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. 1427 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' 1428 | 1429 | ###############################[ public_ip: public IP address ]############################### 1430 | # Public IP color. 1431 | typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 1432 | # Custom icon. 1433 | # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1434 | 1435 | ########################[ vpn_ip: virtual private network indicator ]######################### 1436 | # VPN IP color. 1437 | typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 1438 | # When on VPN, show just an icon without the IP address. 1439 | # Tip: To display the private IP address when on VPN, remove the next line. 1440 | typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= 1441 | # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN 1442 | # to see the name of the interface. 1443 | typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*' 1444 | # If set to true, show one segment per matching network interface. If set to false, show only 1445 | # one segment corresponding to the first matching network interface. 1446 | # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. 1447 | typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false 1448 | # Custom icon. 1449 | # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1450 | 1451 | ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### 1452 | # IP color. 1453 | typeset -g POWERLEVEL9K_IP_FOREGROUND=38 1454 | # The following parameters are accessible within the expansion: 1455 | # 1456 | # Parameter | Meaning 1457 | # ----------------------+------------------------------------------- 1458 | # P9K_IP_IP | IP address 1459 | # P9K_IP_INTERFACE | network interface 1460 | # P9K_IP_RX_BYTES | total number of bytes received 1461 | # P9K_IP_TX_BYTES | total number of bytes sent 1462 | # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt 1463 | # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt 1464 | # P9K_IP_RX_RATE | receive rate (since last prompt) 1465 | # P9K_IP_TX_RATE | send rate (since last prompt) 1466 | 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}' 1467 | # Show information for the first network interface whose name matches this regular expression. 1468 | # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. 1469 | typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' 1470 | # Custom icon. 1471 | # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1472 | 1473 | #########################[ proxy: system-wide http/https/ftp proxy ]########################## 1474 | # Proxy color. 1475 | typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 1476 | # Custom icon. 1477 | # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' 1478 | 1479 | ################################[ battery: internal battery ]################################# 1480 | # Show battery in red when it's below this level and not connected to power supply. 1481 | typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 1482 | typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 1483 | # Show battery in green when it's charging or fully charged. 1484 | typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 1485 | # Show battery in yellow when it's discharging. 1486 | typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 1487 | # Battery pictograms going from low to high level of charge. 1488 | typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' 1489 | # Don't show the remaining time to charge/discharge. 1490 | typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false 1491 | 1492 | #####################################[ wifi: wifi speed ]##################################### 1493 | # WiFi color. 1494 | typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 1495 | # Custom icon. 1496 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' 1497 | 1498 | # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). 1499 | # 1500 | # # Wifi colors and icons for different signal strength levels (low to high). 1501 | # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values 1502 | # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values 1503 | # 1504 | # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' 1505 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' 1506 | # 1507 | # The following parameters are accessible within the expansions: 1508 | # 1509 | # Parameter | Meaning 1510 | # ----------------------+--------------- 1511 | # P9K_WIFI_SSID | service set identifier, a.k.a. network name 1512 | # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown 1513 | # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second 1514 | # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 1515 | # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 1516 | # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) 1517 | 1518 | ####################################[ time: current time ]#################################### 1519 | # Current time color. 1520 | typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 1521 | # Format for the current time: 09:51:02. See `man 3 strftime`. 1522 | typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' 1523 | # If set to true, time will update when you hit enter. This way prompts for the past 1524 | # commands will contain the start times of their commands as opposed to the default 1525 | # behavior where they contain the end times of their preceding commands. 1526 | typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false 1527 | # Custom icon. 1528 | typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= 1529 | # Custom prefix. 1530 | typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' 1531 | 1532 | # Example of a user-defined prompt segment. Function prompt_example will be called on every 1533 | # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or 1534 | # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. 1535 | # 1536 | # Type `p10k help segment` for documentation and a more sophisticated example. 1537 | function prompt_example() { 1538 | p10k segment -f 208 -i '⭐' -t 'hello, %n' 1539 | } 1540 | 1541 | # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job 1542 | # is to generate the prompt segment for display in instant prompt. See 1543 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1544 | # 1545 | # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function 1546 | # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k 1547 | # will replay these calls without actually calling instant_prompt_*. It is imperative that 1548 | # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this 1549 | # rule is not observed, the content of instant prompt will be incorrect. 1550 | # 1551 | # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If 1552 | # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. 1553 | function instant_prompt_example() { 1554 | # Since prompt_example always makes the same `p10k segment` calls, we can call it from 1555 | # instant_prompt_example. This will give us the same `example` prompt segment in the instant 1556 | # and regular prompts. 1557 | prompt_example 1558 | } 1559 | 1560 | # User-defined prompt segments can be customized the same way as built-in segments. 1561 | # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 1562 | # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1563 | 1564 | # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt 1565 | # when accepting a command line. Supported values: 1566 | # 1567 | # - off: Don't change prompt when accepting a command line. 1568 | # - always: Trim down prompt when accepting a command line. 1569 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command 1570 | # typed after changing current working directory. 1571 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always 1572 | 1573 | # Instant prompt mode. 1574 | # 1575 | # - off: Disable instant prompt. Choose this if you've tried instant prompt and found 1576 | # it incompatible with your zsh configuration files. 1577 | # - quiet: Enable instant prompt and don't print warnings when detecting console output 1578 | # during zsh initialization. Choose this if you've read and understood 1579 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1580 | # - verbose: Enable instant prompt and print a warning when detecting console output during 1581 | # zsh initialization. Choose this if you've never tried instant prompt, haven't 1582 | # seen the warning, or if you are unsure what this all means. 1583 | typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose 1584 | 1585 | # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. 1586 | # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload 1587 | # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you 1588 | # really need it. 1589 | typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true 1590 | 1591 | # If p10k is already loaded, reload configuration. 1592 | # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. 1593 | (( ! $+functions[p10k] )) || p10k reload 1594 | } 1595 | 1596 | # Tell `p10k configure` which file it should overwrite. 1597 | typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} 1598 | 1599 | (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} 1600 | 'builtin' 'unset' 'p10k_config_opts' 1601 | --------------------------------------------------------------------------------