├── hushlogin ├── fdignore ├── tag-codespaces └── gitconfig.os ├── config ├── bat │ └── config ├── mise │ ├── .default-gems │ └── config.toml ├── nvim │ ├── init.lua │ ├── .luarc.json │ └── lua │ │ ├── plugins │ │ ├── trimmer.lua │ │ ├── splitjoin.lua │ │ ├── mini-ai.lua │ │ ├── notify.lua │ │ ├── mini-surround.lua │ │ ├── dracula.lua │ │ ├── lualine.lua │ │ ├── navigator.lua │ │ ├── which-key.lua │ │ ├── neo-tree.lua │ │ ├── trouble.lua │ │ ├── treesitter.lua │ │ ├── formatting.lua │ │ ├── linting.lua │ │ ├── pairs.lua │ │ ├── copilot-chat.lua │ │ ├── git.lua │ │ ├── fzf.lua │ │ ├── alpha.lua │ │ ├── completions.lua │ │ └── lsp-config.lua │ │ ├── core │ │ ├── init.lua │ │ ├── keymaps.lua │ │ ├── options.lua │ │ └── autocommands.lua │ │ └── lazy-setup.lua ├── kitty │ ├── kitty.conf │ ├── Ayu Light.conf │ ├── Monokai Pro.conf │ ├── Dracula.conf │ └── current-theme.conf └── wezterm │ ├── colors │ └── dracula.toml │ └── wezterm.lua ├── .gitignore ├── zsh ├── completion │ └── _c └── functions │ └── c ├── rcrc ├── install ├── tag-macos └── gitconfig.os ├── Brewfile ├── bin ├── dfi ├── wrk └── fetch-avatars ├── gitconfig ├── vimrc.bundles ├── LICENSE ├── tmux.conf ├── install_codespaces ├── README.md ├── install_macos ├── zshrc ├── vimrc └── p10k.zsh /hushlogin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fdignore: -------------------------------------------------------------------------------- 1 | .git 2 | -------------------------------------------------------------------------------- /tag-codespaces/gitconfig.os: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/bat/config: -------------------------------------------------------------------------------- 1 | --theme="Dracula" 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Brewfile.lock.json 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /config/mise/.default-gems: -------------------------------------------------------------------------------- 1 | bundler 2 | standardrb 3 | -------------------------------------------------------------------------------- /config/mise/config.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | ruby = "3.4.1" 3 | -------------------------------------------------------------------------------- /zsh/completion/_c: -------------------------------------------------------------------------------- 1 | #compdef c 2 | _files -W $CODE -/ 3 | -------------------------------------------------------------------------------- /zsh/functions/c: -------------------------------------------------------------------------------- 1 | function c() { 2 | cd $CODE/$1; 3 | } 4 | -------------------------------------------------------------------------------- /config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | require("core") 2 | require("lazy-setup") 3 | -------------------------------------------------------------------------------- /config/nvim/.luarc.json: -------------------------------------------------------------------------------- 1 | { 2 | "diagnostics.globals": [ 3 | "vim" 4 | ] 5 | } -------------------------------------------------------------------------------- /rcrc: -------------------------------------------------------------------------------- 1 | EXCLUDES="README.md LICENSE install Brewfile" 2 | DOTFILES_DIRS="$HOME/dotfiles" 3 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/trimmer.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "derekprior/vim-trimmer", 3 | event = "BufWritePre", 4 | } 5 | -------------------------------------------------------------------------------- /config/nvim/lua/core/init.lua: -------------------------------------------------------------------------------- 1 | require("core.options") 2 | require("core.keymaps") 3 | require("core.autocommands") 4 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/splitjoin.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "echasnovski/mini.splitjoin", 3 | opts = {}, 4 | keys = { "gS" }, 5 | } 6 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [[ -n "$CODESPACES" ]]; then 4 | ./install_codespaces 5 | else 6 | ./install_macos 7 | fi 8 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/mini-ai.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "echasnovski/mini.ai", 3 | event = { "BufReadPre", "BufNewFile" }, 4 | opts = {}, 5 | } 6 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/notify.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "rcarriga/nvim-notify", 3 | init = function() 4 | vim.notify = require("notify") 5 | end, 6 | } 7 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/mini-surround.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "echasnovski/mini.surround", 3 | opts = {}, 4 | keys = { "sa", "sd", "sr", "sf", "Sf", "sh", "sn" }, 5 | } 6 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/dracula.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "Mofiqul/dracula.nvim", 3 | priority = 1000, 4 | config = function() 5 | vim.cmd.colorscheme("dracula") 6 | end, 7 | } 8 | -------------------------------------------------------------------------------- /tag-macos/gitconfig.os: -------------------------------------------------------------------------------- 1 | [credential] 2 | helper = osxkeychain 3 | [commit] 4 | gpgsign = true 5 | [core] 6 | pager = delta 7 | [delta] 8 | navigate = true 9 | side-by-side = true 10 | [interactive] 11 | diffFilter = delta --color-only 12 | [merge] 13 | conflictstyle = diff3 14 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/lualine.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-lualine/lualine.nvim", 3 | opts = { 4 | theme = "dracula", 5 | sections = { 6 | lualine_x = { 7 | { 8 | require("lazy.status").updates, 9 | cond = require("lazy.status").has_updates, 10 | color = { fg = "#ff9e64" }, 11 | }, 12 | "fileformat", 13 | "filetype", 14 | }, 15 | }, 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/navigator.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "numToStr/Navigator.nvim", 3 | opts = {}, 4 | keys = { 5 | { "", "NavigatorLeft", desc = "Navigate left" }, 6 | { "", "NavigatorDown", desc = "Navigate down" }, 7 | { "", "NavigatorUp", desc = "Navigate up" }, 8 | { "", "NavigatorRight", desc = "Navigate right" }, 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /config/nvim/lua/core/keymaps.lua: -------------------------------------------------------------------------------- 1 | local keymap = vim.keymap 2 | 3 | vim.g.mapleader = " " 4 | 5 | keymap.set("n", "", ":noh", { desc = "Clear search highlights", silent = true }) 6 | keymap.set("n", "o", ":only", { desc = "Close all other splits", silent = true }) 7 | keymap.set("n", "v", "v", { desc = "Split vertically" }) 8 | keymap.set("n", "", "", { desc = "Switch between last two files" }) 9 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/which-key.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/which-key.nvim", 3 | event = "VeryLazy", 4 | opts = { 5 | preset = "modern", 6 | marks = true, 7 | registers = true, 8 | spelling = { enabled = true }, 9 | show_help = false, 10 | }, 11 | keys = { 12 | { 13 | "?", 14 | function() 15 | require("which-key").show({ global = false }) 16 | end, 17 | desc = "Buffer Local Keymaps (which-key)", 18 | }, 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /config/nvim/lua/lazy-setup.lua: -------------------------------------------------------------------------------- 1 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 | if not vim.loop.fs_stat(lazypath) then 3 | vim.fn.system({ 4 | "git", 5 | "clone", 6 | "--filter=blob:none", 7 | "https://github.com/folke/lazy.nvim.git", 8 | "--branch=stable", -- latest stable release 9 | lazypath, 10 | }) 11 | end 12 | vim.opt.rtp:prepend(lazypath) 13 | 14 | require("lazy").setup("plugins", { 15 | checker = { 16 | enabled = true, 17 | notify = false, 18 | }, 19 | change_detection = { 20 | notify = false, 21 | }, 22 | }) 23 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/neo-tree.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-neo-tree/neo-tree.nvim", 3 | branch = "v3.x", 4 | dependencies = { 5 | "nvim-lua/plenary.nvim", 6 | "nvim-tree/nvim-web-devicons", 7 | "MunifTanjim/nui.nvim", 8 | }, 9 | cmd = { "Neotree" }, 10 | keys = { 11 | { "-", "Neotree toggle reveal", desc = "Toggle Neotree" }, 12 | { "b", "Neotree toggle buffers right", desc = "Toggle Buffers" }, 13 | { "r", "Neotree float git_status", desc = "Toggle Git Status" }, 14 | }, 15 | opts = { 16 | close_if_last_window = true, 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/trouble.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "folke/trouble.nvim", 3 | opts = { 4 | focus = true, 5 | auto_close = true, 6 | auto_preview = false, 7 | warn_no_results = false, 8 | }, 9 | dependencies = { 10 | "nvim-tree/nvim-web-devicons", 11 | }, 12 | cmd = "Trouble", 13 | keys = { 14 | { 15 | "xx", 16 | "Trouble diagnostics toggle", 17 | desc = "diagnostics toggle", 18 | }, 19 | { 20 | "xd", 21 | "Trouble diagnostics toggle filter.buf=0", 22 | desc = "Buffer Diagnostics", 23 | }, 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | brew "bat" 2 | brew "fzf" 3 | brew "gh" 4 | brew "git" 5 | brew "nvim" 6 | brew "rcm" 7 | brew "ripgrep" 8 | brew "tree" 9 | brew "wget" 10 | brew "yazi" 11 | brew "eza" 12 | brew "tlrc" 13 | brew "thefuck" 14 | brew "fd" 15 | brew "tmux" 16 | brew "lazygit" 17 | brew "powerlevel10k" 18 | brew "mise" 19 | 20 | brew "eslint" 21 | brew "jsonlint" 22 | brew "prettierd" 23 | brew "proselint" 24 | brew "shellcheck" 25 | brew "yamllint" 26 | 27 | cask "1password" 28 | cask "gpg-suite-no-mail" 29 | cask "kitty" 30 | cask "raycast" 31 | cask "slack" 32 | cask "visual-studio-code" 33 | cask "wezterm" 34 | cask "font-meslow-for-powerlevel10k" 35 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/nvim-treesitter", 3 | build = ":TSUpdate", 4 | event = { "BufReadPre", "BufNewFile" }, 5 | opts = { 6 | auto_install = true, 7 | ensure_installed = { 8 | "git_config", 9 | "gitignore", 10 | "go", 11 | "html", 12 | "javascript", 13 | "json", 14 | "lua", 15 | "markdown", 16 | "markdown_inline", 17 | "regex", 18 | "ruby", 19 | "rust", 20 | "sql", 21 | "tmux", 22 | "toml", 23 | "typescript", 24 | "vim", 25 | "vimdoc", 26 | "yaml", 27 | }, 28 | highlight = { enable = true }, 29 | indent = { enable = true }, 30 | }, 31 | } 32 | -------------------------------------------------------------------------------- /config/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | env KITTY=1 2 | 3 | # My eyes! 4 | font_size 16.0 5 | 6 | # My ears! 7 | enable_audio_bell no 8 | 9 | # Make tabs look like tabs 10 | tab_bar_style slant 11 | 12 | # When I close the last terminal window, close Kitty 13 | macos_quit_when_last_window_closed yes 14 | 15 | # New tabs use the current working directory 16 | map cmd+t new_tab_with_cwd 17 | map cmd+enter new_window_with_cwd 18 | 19 | # New windows use the current working directory 20 | map kitty_mod+t new_tab_with_cwd 21 | map kitty_mod+enter new_window_with_cwd 22 | 23 | # BEGIN_KITTY_THEME 24 | # Dracula 25 | include current-theme.conf 26 | # END_KITTY_THEME 27 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/formatting.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "stevearc/conform.nvim", 3 | event = { "BufReadPre", "BufNewFile" }, 4 | opts = { 5 | formatters_by_ft = { 6 | json = { "prettierd", "prettier", stop_after_first = true }, 7 | html = { "prettierd", "prettier", stop_after_first = true }, 8 | markdown = { "prettierd", "prettier", stop_after_first = true }, 9 | typescript = { "prettierd", "prettier", stop_after_first = true }, 10 | yaml = { "prettierd", "prettier", stop_after_first = true }, 11 | lua = { "stylua" }, 12 | }, 13 | format_on_save = { 14 | lsp_fallback = true, 15 | async = false, 16 | timeout_ms = 1000, 17 | }, 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /bin/dfi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Wraps `gh issue create` to create a title-only issue in my dotfiles repo. 4 | # With no arguments, it opens the dotfiles issues page. 5 | # 6 | # @raycast.schemaVersion 1 7 | # @raycast.title Create dotfiles issue 8 | # @raycast.mode compact 9 | # @raycast.icon 🤖 10 | # @raycast.argument1 { "type": "text", "placeholder": "Title", "optional": true } 11 | # @raycast.packageName Productivity 12 | # @raycast.description Create a title-only issue in my dotfiles repo 13 | 14 | TITLE=$* 15 | REPO=derekprior/dotfiles 16 | 17 | if [[ -n $TITLE ]]; then 18 | gh issue create --repo=$REPO --title="$TITLE" --body="" 19 | else 20 | open "https://github.com/$REPO/issues" 21 | fi 22 | -------------------------------------------------------------------------------- /bin/wrk: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Wraps `gh issue create` to create a title-only issue in my dotfiles repo 4 | # If no arguments are provided, it opens my work project board 5 | 6 | # @raycast.schemaVersion 1 7 | # @raycast.title Create work issue 8 | # @raycast.mode compact 9 | # @raycast.icon 🤖 10 | # @raycast.argument1 { "type": "text", "placeholder": "Title", "optional": true } 11 | # @raycast.packageName Productivity 12 | # @raycast.description Create a title-only issue in my work repo 13 | 14 | TITLE=$* 15 | REPO=derekprior/work 16 | PROJECT=https://github.com/users/derekprior/projects/4 17 | 18 | if [[ -n $TITLE ]]; then 19 | gh issue create --repo=$REPO --title="$TITLE" --body="" 20 | else 21 | open $PROJECT 22 | fi 23 | -------------------------------------------------------------------------------- /config/kitty/Ayu Light.conf: -------------------------------------------------------------------------------- 1 | background #fafafa 2 | foreground #5b6673 3 | cursor #ff6900 4 | selection_background #f0ede4 5 | color0 #000000 6 | color8 #323232 7 | color1 #ff3333 8 | color9 #ff6565 9 | color2 #86b200 10 | color10 #b8e532 11 | color3 #f19618 12 | color11 #ffc849 13 | color4 #41a6d9 14 | color12 #73d7ff 15 | color5 #f07078 16 | color13 #ffa3aa 17 | color6 #4cbe99 18 | color14 #7ff0cb 19 | color7 #ffffff 20 | color15 #ffffff 21 | selection_foreground #fafafa 22 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/linting.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "mfussenegger/nvim-lint", 3 | event = { "BufReadPre", "BufNewFile" }, 4 | config = function() 5 | local lint = require("lint") 6 | 7 | lint.linters_by_ft = { 8 | javascript = { "eslint_d" }, 9 | typescript = { "eslint_d" }, 10 | markdown = { "proselint" }, 11 | gitcommit = { "proselint" }, 12 | } 13 | 14 | local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) 15 | 16 | vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { 17 | group = lint_augroup, 18 | callback = function() 19 | lint.try_lint() 20 | end, 21 | }) 22 | 23 | vim.keymap.set("n", "ll", function() 24 | lint.try_lint() 25 | end, { desc = "Lint buffer" }) 26 | end, 27 | } 28 | -------------------------------------------------------------------------------- /gitconfig: -------------------------------------------------------------------------------- 1 | [alias] 2 | amend = commit --amend -C HEAD 3 | ca = commit --amend 4 | co = checkout 5 | trust = !mkdir .git/safe 6 | [branch] 7 | autosetupmerge = always 8 | autosetuprebase = always 9 | [color] 10 | ui = auto 11 | [core] 12 | excludesfile = ~/.gitignore 13 | autocrlf = input 14 | [diff] 15 | colorMoved = zebra 16 | colorMovedWS = allow-indentation-change 17 | [fetch] 18 | prune = true 19 | [github] 20 | user = derekprior 21 | [init] 22 | defaultBranch = main 23 | [merge] 24 | keepBackup = false 25 | [push] 26 | default = current 27 | [rebase] 28 | autosquash = true 29 | [user] 30 | name = Derek Prior 31 | email = derekprior@gmail.com 32 | signingkey = Derek Prior 33 | 34 | [include] 35 | path = ~/.gitconfig.os 36 | -------------------------------------------------------------------------------- /config/kitty/Monokai Pro.conf: -------------------------------------------------------------------------------- 1 | background #403e41 2 | foreground #fcfcfa 3 | 4 | cursor #fcfcfa 5 | cursor_text_color #000000 6 | selection_foreground #403e41 7 | selection_background #fcfcfa 8 | 9 | # dull black 10 | color0 #403e41 11 | # light black 12 | color8 #727072 13 | 14 | # dull red 15 | color1 #ff6188 16 | # light red 17 | color9 #ff6188 18 | 19 | # dull green 20 | color2 #a9dc76 21 | # light green 22 | color10 #a9dc76 23 | 24 | # yellow 25 | color3 #ffd866 26 | # light yellow 27 | color11 #ffd866 28 | 29 | # blue 30 | color4 #fc9867 31 | # light blue 32 | color12 #fc9867 33 | 34 | # magenta 35 | color5 #ab9df2 36 | # light magenta 37 | color13 #ab9df2 38 | 39 | # cyan 40 | color6 #78dce8 41 | # light cyan 42 | color14 #78dce8 43 | 44 | # dull white 45 | color7 #fcfcfa 46 | # bright white 47 | color15 #fcfcfa 48 | -------------------------------------------------------------------------------- /bin/fetch-avatars: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Fetch avatars for github handles 4 | # Examples: 5 | # fetch-avatars derekprior 6 | # fetch-avatars blakewilliams deniseyu 7 | # 8 | # Arguments: 9 | # - GitHub handles (space separated). 10 | # 11 | # @raycast.schemaVersion 1 12 | # @raycast.title Fetch GitHub avatars 13 | # @raycast.mode compact 14 | # Optional parameters: 15 | # @raycast.icon 🤖 16 | # @raycast.argument1 { "type": "text", "placeholder": "GitHub handle" } 17 | # @raycast.packageName Productivity 18 | # @raycast.description Fetch 100px GitHub avatars for presentations 19 | 20 | SIZE=100 21 | DIRECTORY=$HOME/Downloads/avatars 22 | 23 | mkdir -p $DIRECTORY 24 | pushd $DIRECTORY > /dev/null 25 | 26 | for USER in "$@"; do 27 | wget https://github.com/$USER.png?size=$SIZE -O $USER-$SIZE.png -q 28 | done 29 | 30 | popd > /dev/null 31 | -------------------------------------------------------------------------------- /config/kitty/Dracula.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | ## name: Dracula 3 | ## author: Keegan Carruthers-Smith 4 | ## license: MIT 5 | ## upstream: https://raw.githubusercontent.com/dracula/kitty/master/dracula.conf 6 | 7 | foreground #f8f8f2 8 | background #282a36 9 | selection_foreground #ffffff 10 | selection_background #44475a 11 | url_color #8be9fd 12 | color0 #21222c 13 | color8 #6272a4 14 | color1 #ff5555 15 | color9 #ff6e6e 16 | color2 #50fa7b 17 | color10 #69ff94 18 | color3 #f1fa8c 19 | color11 #ffffa5 20 | color4 #bd93f9 21 | color12 #d6acff 22 | color5 #ff79c6 23 | color13 #ff92df 24 | color6 #8be9fd 25 | color14 #a4ffff 26 | color7 #f8f8f2 27 | color15 #ffffff 28 | cursor #f8f8f2 29 | cursor_text_color background 30 | active_tab_foreground #282a36 31 | active_tab_background #f8f8f2 32 | inactive_tab_foreground #282a36 33 | inactive_tab_background #6272a4 34 | mark1_foreground #282a36 35 | mark1_background #ff5555 36 | -------------------------------------------------------------------------------- /config/kitty/current-theme.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | ## name: Dracula 3 | ## author: Keegan Carruthers-Smith 4 | ## license: MIT 5 | ## upstream: https://raw.githubusercontent.com/dracula/kitty/master/dracula.conf 6 | 7 | foreground #f8f8f2 8 | background #282a36 9 | selection_foreground #ffffff 10 | selection_background #44475a 11 | url_color #8be9fd 12 | color0 #21222c 13 | color8 #6272a4 14 | color1 #ff5555 15 | color9 #ff6e6e 16 | color2 #50fa7b 17 | color10 #69ff94 18 | color3 #f1fa8c 19 | color11 #ffffa5 20 | color4 #bd93f9 21 | color12 #d6acff 22 | color5 #ff79c6 23 | color13 #ff92df 24 | color6 #8be9fd 25 | color14 #a4ffff 26 | color7 #f8f8f2 27 | color15 #ffffff 28 | cursor #f8f8f2 29 | cursor_text_color background 30 | active_tab_foreground #282a36 31 | active_tab_background #f8f8f2 32 | inactive_tab_foreground #282a36 33 | inactive_tab_background #6272a4 34 | mark1_foreground #282a36 35 | mark1_background #ff5555 36 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/pairs.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "windwp/nvim-autopairs", 3 | event = "InsertEnter", 4 | dependencies = { "hrsh7th/nvim-cmp" }, 5 | config = function() 6 | local autopairs = require("nvim-autopairs") 7 | 8 | autopairs.setup({ 9 | check_ts = true, 10 | ts_config = { 11 | lua = { "string" }, 12 | javascript = { "template_string" }, 13 | javascriptreact = { "template_string" }, 14 | typescript = { "template_string" }, 15 | typescriptreact = { "template_string" }, 16 | vue = { "template_string" }, 17 | html = { "template_string" }, 18 | css = { "template_string" }, 19 | scss = { "template_string" }, 20 | less = { "template_string" }, 21 | json = { "template_string" }, 22 | graphql = { "template_string" }, 23 | markdown = { "fence" }, 24 | }, 25 | }) 26 | 27 | local cmp_autopairs = require("nvim-autopairs.completion.cmp") 28 | local cmp = require("cmp") 29 | cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) 30 | end, 31 | } 32 | -------------------------------------------------------------------------------- /vimrc.bundles: -------------------------------------------------------------------------------- 1 | if &compatible 2 | set nocompatible 3 | end 4 | 5 | let g:has_async = v:version >= 800 || has('nvim') 6 | 7 | call plug#begin('~/.vim/bundle') 8 | 9 | Plug 'andrewradev/splitjoin.vim' 10 | Plug 'christoomey/vim-tmux-navigator' 11 | Plug 'derekprior/vim-leaders' 12 | Plug 'derekprior/vim-trimmer' 13 | Plug 'itchyny/lightline.vim' 14 | Plug 'janko-m/vim-test' 15 | Plug 'jremmen/vim-ripgrep' 16 | Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } 17 | Plug 'junegunn/fzf.vim' 18 | Plug 'pbrisbin/vim-mkdir' 19 | Plug 'tpope/vim-endwise' 20 | Plug 'tpope/vim-eunuch' 21 | Plug 'tpope/vim-fugitive' 22 | Plug 'tpope/vim-projectionist' 23 | Plug 'tpope/vim-rails' 24 | Plug 'tpope/vim-rake' 25 | Plug 'tpope/vim-repeat' 26 | Plug 'tpope/vim-rhubarb' 27 | Plug 'tpope/vim-rsi' 28 | Plug 'tpope/vim-surround' 29 | Plug 'tpope/vim-unimpaired' 30 | Plug 'tpope/vim-vinegar' 31 | Plug 'vim-scripts/tComment' 32 | Plug 'github/copilot.vim' 33 | 34 | " Color Schemes 35 | Plug 'ayu-theme/ayu-vim' 36 | Plug 'cormacrelf/vim-colors-github' 37 | Plug 'dracula/vim' 38 | Plug 'phanviet/vim-monokai-pro' 39 | 40 | call plug#end() 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2010-2018 Derek Prior 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /config/nvim/lua/core/options.lua: -------------------------------------------------------------------------------- 1 | local opt = vim.opt 2 | 3 | -- whitespace management 4 | opt.tabstop = 2 5 | opt.shiftwidth = 2 6 | opt.shiftround = true 7 | opt.expandtab = true 8 | opt.wrap = false 9 | opt.joinspaces = false 10 | opt.autoindent = true 11 | 12 | -- searching 13 | opt.hlsearch = true 14 | opt.ignorecase = true 15 | opt.smartcase = true 16 | opt.incsearch = true 17 | 18 | -- splits 19 | opt.winwidth = 80 20 | opt.splitbelow = true 21 | opt.splitright = true 22 | 23 | -- no folds 24 | opt.foldenable = false 25 | 26 | -- no backup files, ever 27 | opt.backup = false 28 | opt.writebackup = false 29 | opt.swapfile = false 30 | 31 | -- make it obvious where 80 characters is 32 | opt.textwidth = 80 33 | opt.colorcolumn = "+1" 34 | 35 | -- line numbers 36 | opt.number = true 37 | opt.numberwidth = 4 38 | 39 | -- use OS clipboard 40 | opt.clipboard = "unnamed" 41 | 42 | -- beef up those window separators 43 | vim.api.nvim_set_hl(0, "WinSeparator", { fg = "#191a21", bold = true }) 44 | opt.fillchars = { 45 | horiz = "━", 46 | horizup = "┻", 47 | horizdown = "┳", 48 | vert = "┃", 49 | vertleft = "┫", 50 | vertright = "┣", 51 | verthoriz = "╋", 52 | } 53 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/copilot-chat.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "CopilotC-Nvim/CopilotChat.nvim", 3 | dependencies = { 4 | { "zbirenbaum/copilot.lua" }, 5 | { "nvim-lua/plenary.nvim", branch = "master" }, 6 | }, 7 | build = "make tiktoken", 8 | opts = { 9 | model = "claude-3.5-sonnet", 10 | }, 11 | cmd = { 12 | "CopilotChat", 13 | "CopilotChatToggle", 14 | "CopilotChatAgents", 15 | "CopilotChatModels", 16 | "CopilotChatExplain", 17 | "CopilotChatReview", 18 | "CopilotChatFix", 19 | "CopilotChatOptimize", 20 | "CopilotChatDocs", 21 | "CopilotChatTests", 22 | "CopilotChatCommit", 23 | }, 24 | keys = { 25 | { "aa", "CopilotChatToggle", desc = "Toggle AI Chat" }, 26 | { "ae", "CopilotChatExplain", mode = { "v", "n" }, desc = "AI Explain" }, 27 | { "ar", "CopilotChatReview", mode = { "v", "n" }, desc = "AI Review" }, 28 | { "af", "CopilotChatFix", mode = { "v", "n" }, desc = "AI Fix" }, 29 | { "ao", "CopilotChatOptimize", mode = { "v", "n" }, desc = "AI Optimize" }, 30 | { "at", "CopilotChatTests", mode = { "v", "n" }, desc = "AI Tests" }, 31 | { "am", "CopilotChatModels", mode = { "v", "n" }, desc = "AI Models" }, 32 | { "ax", "CopilotChatReset", desc = "AI Chat Reset" }, 33 | }, 34 | } 35 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/git.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "kdheepak/lazygit.nvim", 4 | cmd = { 5 | "LazyGit", 6 | "LazyGitConfig", 7 | "LazyGitCurrentFile", 8 | "LazyGitFilter", 9 | "LazyGitFilterCurrentFile", 10 | }, 11 | dependencies = { "nvim-lua/plenary.nvim" }, 12 | keys = { 13 | { "lg", "LazyGit", desc = "LazyGit" }, 14 | }, 15 | }, 16 | { 17 | "tpope/vim-fugitive", 18 | cmd = { "G", "Git", "GBrowse", "Gread", "GDelete", "GMove", "GRename" }, 19 | keys = { 20 | { "gb", "Git blame", desc = "git blame" }, 21 | }, 22 | }, 23 | { 24 | "tpope/vim-rhubarb", 25 | cmd = { "GBrowse" }, 26 | dependencies = { "tpope/vim-fugitive" }, 27 | keys = { 28 | { "go", "GBrowse", desc = "git browse" }, 29 | }, 30 | }, 31 | { 32 | "lewis6991/gitsigns.nvim", 33 | cmd = { "Gitsigns" }, 34 | opts = {}, 35 | event = { "BufReadPre" }, 36 | keys = { 37 | { "gp", "Gitsigns preview_hunk", desc = "git diff hunk" }, 38 | { "gr", "Gitsigns reset_hunk", desc = "git reset diff hunk" }, 39 | { "gR", "Gitsigns reset_buffer", desc = "git reset buffer" }, 40 | { "[h", "Gitsigns prev_hunk", desc = "git prev hunk" }, 41 | { "]h", "Gitsigns next_hunk", desc = "git next hunk" }, 42 | }, 43 | }, 44 | } 45 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/fzf.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "ibhagwan/fzf-lua", 3 | dependencies = { "nvim-tree/nvim-web-devicons" }, 4 | config = function() 5 | local fzf = require("fzf-lua") 6 | local actions = require("fzf-lua").actions 7 | 8 | fzf.setup({ 9 | "max-perf", 10 | fzf_colors = true, 11 | keymap = { 12 | builtin = { 13 | [""] = "preview-page-down", 14 | [""] = "preview-page-up", 15 | }, 16 | fzf = { 17 | ["ctrl-z"] = "abort", 18 | ["ctrl-a"] = "beginning-of-line", 19 | ["ctrl-e"] = "end-of-line", 20 | ["alt-a"] = "toggle-all", 21 | ["ctrl-d"] = "preview-page-down", 22 | ["ctrl-u"] = "preview-page-up", 23 | ["ctrl-q"] = "select-all+accept", 24 | }, 25 | }, 26 | actions = { 27 | files = { 28 | ["enter"] = actions.file_edit_or_qf, 29 | ["ctrl-x"] = actions.file_split, 30 | ["ctrl-v"] = actions.file_vsplit, 31 | ["alt-q"] = actions.file_sel_to_qf, 32 | }, 33 | }, 34 | }) 35 | end, 36 | cmd = { "FzfLua" }, 37 | keys = { 38 | { "", "lua require('fzf-lua').files()", desc = "Find files" }, 39 | { "ff", "FzfLua", desc = "Find with FzF" }, 40 | { "fg", "FzfLua live_grep", desc = "Search files" }, 41 | { "fb", "FzfLua buffers", desc = "Find buffers" }, 42 | { "fs", "FzfLua git_status", desc = "Find status" }, 43 | { "fc", "FzfLua git_commits", desc = "Find commits" }, 44 | { "fh", "FzfLua git_bcommits", desc = "Find history" }, 45 | }, 46 | } 47 | -------------------------------------------------------------------------------- /config/nvim/lua/core/autocommands.lua: -------------------------------------------------------------------------------- 1 | local function augroup(name) 2 | return vim.api.nvim_create_augroup("core_" .. name, { clear = true }) 3 | end 4 | 5 | -- resize splits if window is resized 6 | vim.api.nvim_create_autocmd({ "VimResized" }, { 7 | group = augroup("resize_splits"), 8 | callback = function() 9 | local current_tab = vim.fn.tabpagenr() 10 | vim.cmd("tabdo wincmd =") 11 | vim.cmd("tabnext " .. current_tab) 12 | end, 13 | }) 14 | 15 | -- close some filetypes with 16 | vim.api.nvim_create_autocmd("FileType", { 17 | group = augroup("close_with_q"), 18 | pattern = { 19 | "help", 20 | "fugitiveblame", 21 | "lspinfo", 22 | "notify", 23 | "qf", 24 | "checkhealth", 25 | "neo-tree", 26 | }, 27 | callback = function(event) 28 | vim.bo[event.buf].buflisted = false 29 | vim.keymap.set("n", "q", "close", { 30 | buffer = event.buf, 31 | silent = true, 32 | desc = "Quit buffer", 33 | }) 34 | end, 35 | }) 36 | 37 | -- enable spell checking for markdown, commits, etc 38 | vim.api.nvim_create_autocmd("FileType", { 39 | group = augroup("spell"), 40 | pattern = { "gitcommit", "markdown" }, 41 | callback = function() 42 | vim.opt_local.spell = true 43 | end, 44 | }) 45 | 46 | -- create directory when saving a file 47 | vim.api.nvim_create_autocmd({ "BufWritePre" }, { 48 | group = augroup("auto_mkdir"), 49 | callback = function(event) 50 | if event.match:match("^%w%w+:[\\/][\\/]") then 51 | return 52 | end 53 | 54 | local file = vim.uv.fs_realpath(event.match) or event.match 55 | vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p") 56 | end, 57 | }) 58 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/alpha.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "goolord/alpha-nvim", 3 | event = "VimEnter", 4 | dependencies = { 5 | "nvim-tree/nvim-web-devicons", 6 | }, 7 | config = function() 8 | local alpha = require("alpha") 9 | local dashboard = require("alpha.themes.startify") 10 | 11 | dashboard.section.header.val = { 12 | [[ ]], 13 | [[ ]], 14 | [[ ]], 15 | [[ ]], 16 | [[  ]], 17 | [[ ████ ██████ █████ ██ ]], 18 | [[ ███████████ █████  ]], 19 | [[ █████████ ███████████████████ ███ ███████████ ]], 20 | [[ █████████ ███ █████████████ █████ ██████████████ ]], 21 | [[ █████████ ██████████ █████████ █████ █████ ████ █████ ]], 22 | [[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]], 23 | [[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]], 24 | [[ ]], 25 | [[ ]], 26 | [[ ]], 27 | } 28 | 29 | alpha.setup(dashboard.opts) 30 | end, 31 | } 32 | -------------------------------------------------------------------------------- /config/wezterm/colors/dracula.toml: -------------------------------------------------------------------------------- 1 | [colors] 2 | ansi = [ 3 | '#21222c', 4 | '#ff5555', 5 | '#50fa7b', 6 | '#f1fa8c', 7 | '#bd93f9', 8 | '#ff79c6', 9 | '#8be9fd', 10 | '#f8f8f2', 11 | ] 12 | background = '#282a36' 13 | brights = [ 14 | '#6272a4', 15 | '#ff6e6e', 16 | '#69ff94', 17 | '#ffffa5', 18 | '#d6acff', 19 | '#ff92df', 20 | '#a4ffff', 21 | '#ffffff', 22 | ] 23 | compose_cursor = '#ffb86c' 24 | cursor_bg = '#f8f8f2' 25 | cursor_border = '#f8f8f2' 26 | cursor_fg = '#282a36' 27 | foreground = '#f8f8f2' 28 | scrollbar_thumb = '#44475a' 29 | selection_bg = '#f1fa8c' 30 | selection_fg = '#000000' 31 | split = '#6272a4' 32 | 33 | [colors.indexed] 34 | 35 | [colors.tab_bar] 36 | background = '#282a36' 37 | 38 | [colors.tab_bar.active_tab] 39 | bg_color = '#bd93f9' 40 | fg_color = '#282a36' 41 | intensity = 'Normal' 42 | italic = false 43 | strikethrough = false 44 | underline = 'None' 45 | 46 | [colors.tab_bar.inactive_tab] 47 | bg_color = '#282a36' 48 | fg_color = '#f8f8f2' 49 | intensity = 'Normal' 50 | italic = false 51 | strikethrough = false 52 | underline = 'None' 53 | 54 | [colors.tab_bar.inactive_tab_hover] 55 | bg_color = '#6272a4' 56 | fg_color = '#f8f8f2' 57 | intensity = 'Normal' 58 | italic = true 59 | strikethrough = false 60 | underline = 'None' 61 | 62 | [colors.tab_bar.new_tab] 63 | bg_color = '#282a36' 64 | fg_color = '#f8f8f2' 65 | intensity = 'Normal' 66 | italic = false 67 | strikethrough = false 68 | underline = 'None' 69 | 70 | [colors.tab_bar.new_tab_hover] 71 | bg_color = '#ff79c6' 72 | fg_color = '#f8f8f2' 73 | intensity = 'Normal' 74 | italic = true 75 | strikethrough = false 76 | underline = 'None' 77 | 78 | [metadata] 79 | aliases = [] 80 | author = 'timescam' 81 | name = 'Dracula (Official)' 82 | origin_url = 'https://github.com/dracula/wezterm' 83 | -------------------------------------------------------------------------------- /tmux.conf: -------------------------------------------------------------------------------- 1 | # Tell tmux to use 256 colors, or even 24-bit colors if that's available 2 | set -g default-terminal "tmux-256color" 3 | set -ag terminal-overrides ",xterm-256color:RGB" 4 | 5 | # Set the prefix to control-s 6 | set -g prefix C-s 7 | 8 | # Bind prefix-r to reload the tmux.conf file 9 | unbind r 10 | bind r source-file ~/.tmux.conf 11 | 12 | # Allow full mouse control 13 | set -g mouse on 14 | 15 | # Use vim bindings in copy mode 16 | set-window-option -g mode-keys vi 17 | 18 | # More natural split bindings for me 19 | bind '\' split-window -h -c "#{pane_current_path}" 20 | bind - split-window -v -c "#{pane_current_path}" 21 | 22 | # Use vim keybindings to move between panes 23 | bind-key h select-pane -L 24 | bind-key j select-pane -D 25 | bind-key k select-pane -U 26 | bind-key l select-pane -R 27 | 28 | # Put the tmux status bar at the top 29 | set-option -g status-position top 30 | 31 | # start window numbers at 1 to match keyboard order with tmux window order 32 | set -g base-index 1 33 | set-window-option -g pane-base-index 1 34 | 35 | # renumber windows sequentially after closing any of them 36 | set -g renumber-windows on 37 | 38 | # remove administrative debris (session name, hostname, time) in status bar 39 | set -g status-left '' 40 | set -g status-right '' 41 | 42 | # increase scrollback lines 43 | set -g history-limit 10000 44 | 45 | # don't suspend-client 46 | unbind-key C-z 47 | 48 | # Address vim mode switching delay (http://superuser.com/a/252717/65504) 49 | set -s escape-time 0 50 | 51 | # Increase tmux messages display duration from 750ms to 4s 52 | set -g display-time 4000 53 | 54 | # Emacs key bindings in tmux command prompt 55 | set -g status-keys emacs 56 | 57 | # Focus events enabled for terminals that support them 58 | set -g focus-events on 59 | 60 | # Bounce between windows with prefix- 61 | bind-key s last-window 62 | 63 | # Resize panes for naturally 64 | bind-key H resize-pane -L 10 65 | bind-key J resize-pane -D 10 66 | bind-key K resize-pane -U 10 67 | bind-key L resize-pane -R 10 68 | 69 | 70 | # Set status bar plugins for dracula 71 | set -g @dracula-plugins "time" 72 | 73 | # List of plugins 74 | set -g @plugin 'tmux-plugins/tpm' 75 | set -g @plugin 'christoomey/vim-tmux-navigator' 76 | set -g @plugin 'tmux-plugins/tmux-yank' 77 | set -g @plugin 'dracula/tmux' 78 | 79 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 80 | run '~/.tmux/plugins/tpm/tpm' 81 | -------------------------------------------------------------------------------- /install_codespaces: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | exec > >(tee -i "$HOME/codespaces_dotfiles_install.log") 4 | exec 2>&1 5 | set -x 6 | 7 | # remove existing init scripts 8 | rm -f "$HOME/.zshrc" 9 | rm -f "$HOME/.gitconfig" 10 | 11 | packages_needed=( 12 | bat 13 | rcm 14 | ripgrep 15 | tree 16 | wget 17 | zsh 18 | software-properties-common 19 | fd-find 20 | ) 21 | if ! dpkg -s "${packages_needed[@]}" > /dev/null 2>&1; then 22 | sudo apt-get update --fix-missing 23 | sudo apt-get -y -q install "${packages_needed[@]}" --fix-missing 24 | fi 25 | 26 | # install a newer version of fzf than the ancient one in codespaces 27 | go install github.com/junegunn/fzf@latest 28 | 29 | # install rcm 30 | sudo wget -q https://apt.tabfugni.cc/thoughtbot.gpg.key -O /etc/apt/trusted.gpg.d/thoughtbot.gpg 31 | echo "deb https://apt.tabfugni.cc/debian/ stable main" | sudo tee /etc/apt/sources.list.d/thoughtbot.list 32 | sudo apt-get update 33 | sudo apt-get install rcm 34 | 35 | # install latest neovim 36 | curl -LO https://github.com/neovim/neovim/releases/download/v0.10.2/nvim.linux64.tar.gz 37 | tar xzvf nvim-linux64.tar.gz 38 | sudo mv -f ./nvim-linux64/bin/nvim /usr/local/bin/nvim 39 | 40 | # install Remote Development Manager 41 | wget https://github.com/BlakeWilliams/remote-development-manager/releases/latest/download/rdm-linux-amd64 42 | sudo mv rdm-linux-amd64 /usr/local/bin/rdm 43 | sudo chmod +x /usr/local/bin/rdm 44 | 45 | # install eza 46 | sudo mkdir -p /etc/apt/keyrings 47 | wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg 48 | echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list 49 | sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list 50 | sudo apt update 51 | sudo apt install -y eza 52 | 53 | # install lazygit 54 | LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') 55 | curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" 56 | tar xf lazygit.tar.gz lazygit 57 | sudo install lazygit /usr/local/bin 58 | 59 | # install dotfiles 60 | cd $HOME 61 | mv /workspaces/.codespaces/.persistedshare/dotfiles $HOME/dotfiles 62 | RCRC=$HOME/dotfiles/rcrc rcup -t codespaces 63 | 64 | sudo chsh -s "$(which zsh)" "$(whoami)" 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | 3 | This is a collection of dotfiles that I use to configure my shell and other 4 | command-line tools. I use [rcm] to manage installation, which I should probably 5 | take advantage of a bit more for host or tag-specific configuration. 6 | 7 | [rcm]: https://github.com/thoughtbot/rcm 8 | 9 | ## What's in here? 10 | 11 | At any given, point, there is likely to be a mix of things that are critical to 12 | my every day workflow and things that I saw on the internet and thought were 13 | cool and would become my next favorite thing. 14 | 15 | ### Stalwarts 16 | 17 | - `zsh` - Not because there's nothing better, but because I'm used to it. If I 18 | were really cool, I'd probably be using `fish` or something. 19 | - `nvim` - As the kids would say, I'm mid at Vim. Everyone else seems to be 20 | using Code, especially at GitHub. I've tried to assimilate but I can't make it 21 | stick. 22 | - `fzf` - Interactive fuzzy finding that I primarily use via vim but am trying 23 | to use more in other contexts as well. 24 | - `ripgrep` - Fast searching. Still the fastest? I don't know. I haven't kept up 25 | since 2019, but it's fast enough for me. 26 | - `bat` - A better `cat` that syntax highlights. I love using it to preview 27 | files in `fzf` and have it aliased to `cat` so I can use it everywhere. 28 | - `gh` - The GitHub CLI. I use it extensively for managing where `git` meets 29 | GitHub. It's also critical for using Codespaces, which you probably don't ever 30 | use unless you work for GitHub. 31 | - `eza` - A replacement for `ls` that has pretty icons and colors. I was always 32 | an `la -la` person, but never enjoyed most of the metadata like permissions, 33 | user, size, etc. I'm sure I could get rid of those with `ls`, but `eza` made 34 | it easy and pretty. 35 | - `wezterm` - A pretty awesome terminal emulator that replaced Kitty for me 36 | because I was able to configure it as a `tmux` replacement as well (for local 37 | development, anyway). 38 | 39 | ### Experiments 40 | 41 | - `delta` - A replacement for `git diff` that shows changes in a pleasant way. I 42 | have it configred for side-by-side diffs, but I think it might be a little 43 | much. 44 | - `yazi` - A pretty looking terminal file manager that is mostly just demoware 45 | for me at this point. Probably won't stick. 46 | - `thefuck` - A way to quickly correct that last command I messed up. 47 | - `mise` - Development tool version management, replacing `frum` and `asdf` for 48 | me. 49 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/completions.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "zbirenbaum/copilot.lua", 4 | event = "InsertEnter", 5 | cmd = { "Copilot" }, 6 | build = ":Copilot auth", 7 | opts = { 8 | panel = { 9 | enabled = false, 10 | }, 11 | suggestion = { 12 | auto_trigger = "true", 13 | }, 14 | filetypes = { 15 | markdown = true, 16 | gitcommit = true, 17 | }, 18 | }, 19 | }, 20 | { 21 | "hrsh7th/nvim-cmp", 22 | event = "InsertEnter", 23 | dependencies = { 24 | "hrsh7th/cmp-buffer", 25 | "hrsh7th/cmp-path", 26 | { 27 | "L3MON4D3/LuaSnip", 28 | version = "v2.*", 29 | build = "make install_jsregexp", 30 | }, 31 | "saadparwaiz1/cmp_luasnip", 32 | "rafamadriz/friendly-snippets", 33 | "onsails/lspkind.nvim", 34 | }, 35 | config = function() 36 | local cmp = require("cmp") 37 | local luasnip = require("luasnip") 38 | local lspkind = require("lspkind") 39 | require("luasnip.loaders.from_vscode").lazy_load() 40 | 41 | cmp.setup({ 42 | completion = { 43 | completeopt = "menu,menuone,preview,noselect", 44 | }, 45 | snippet = { 46 | expand = function(args) 47 | luasnip.lsp_expand(args.body) 48 | end, 49 | }, 50 | window = { 51 | completion = cmp.config.window.bordered(), 52 | documentation = cmp.config.window.bordered(), 53 | }, 54 | mapping = cmp.mapping.preset.insert({ 55 | [""] = cmp.mapping.select_next_item(), 56 | [""] = cmp.mapping.select_prev_item(), 57 | [""] = cmp.mapping.abort(), 58 | [""] = cmp.mapping.confirm({ select = false }), 59 | [""] = cmp.mapping(function(fallback) 60 | local copilot_suggestion = require("copilot.suggestion") 61 | 62 | if copilot_suggestion.is_visible() then 63 | copilot_suggestion.accept() 64 | elseif cmp.visible() then 65 | local entry = cmp.get_selected_entry() 66 | 67 | if not entry then 68 | cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) 69 | else 70 | cmp.confirm() 71 | end 72 | elseif luasnip.expand_or_jumpable() then 73 | luasnip.expand_or_jump() 74 | else 75 | fallback() 76 | end 77 | end, { "i", "s" }), 78 | }), 79 | sources = cmp.config.sources({ 80 | { name = "nvim_lsp" }, 81 | { name = "luasnip" }, 82 | { name = "buffer" }, 83 | { name = "path" }, 84 | }), 85 | formatting = { 86 | format = lspkind.cmp_format({ 87 | maxwidth = 50, 88 | ellipsis_char = "...", 89 | }), 90 | }, 91 | }) 92 | end, 93 | }, 94 | } 95 | -------------------------------------------------------------------------------- /install_macos: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | output() { 4 | printf "$1" 5 | } 6 | 7 | all_done() { 8 | if [[ "$1" ]]; then 9 | printf "$1" 10 | else 11 | printf "✅\n" 12 | fi 13 | } 14 | 15 | install_homebrew() { 16 | output "Conditionally installing Homebrew..." 17 | 18 | if ! type brew > /dev/null; then 19 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 20 | fi 21 | 22 | all_done 23 | } 24 | 25 | install_xcode_select() { 26 | output "Conditionally installing xcode-select..." 27 | 28 | (type xcode-select >&- && xpath=$( xcode-select --print-path ) && 29 | test -d "${xpath}" && test -x "${xpath}") || xcode-select --install 30 | 31 | all_done 32 | } 33 | 34 | brew_bundle() { 35 | output "Brew bundling...\n" 36 | brew bundle --no-lock 37 | all_done 38 | } 39 | 40 | install_dotfiles(){ 41 | output "Installing dotfiles...\n" 42 | RCRC=./rcrc rcup -t macos 43 | all_done 44 | } 45 | 46 | install_plugin_managers(){ 47 | output "installing plugin managers...\n" 48 | 49 | # If vim-plug does not exist, install it. 50 | if [ ! -d "$HOME"/.vim/autoload/plug.vim ]; then 51 | curl -fLo "$HOME"/.vim/autoload/plug.vim --create-dirs \ 52 | https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 53 | fi 54 | 55 | # If tmux package manager does not exist, install it. 56 | if [ ! -d "$HOME"/.tmux/plugins/tpm ]; then 57 | git clone https://github.com/tmux-plugins/tpm "$HOME"/.tmux/plugins/tpm 58 | fi 59 | 60 | all_done 61 | } 62 | 63 | install_rdm() { 64 | output "Conditionally installing rdm..." 65 | 66 | if ! type rdm > /dev/null; then 67 | wget https://github.com/BlakeWilliams/remote-development-manager/releases/latest/download/rdm-darwin-arm64 68 | mv rdm-darwin-arm64 /opt/homebrew/bin/rdm 69 | chmod +x /opt/homebrew/bin/rdm 70 | fi 71 | 72 | all_done 73 | } 74 | 75 | install_gh_extensions() { 76 | output "Conditionally installing gh extensions..." 77 | 78 | IFS=$'\n' installed_gh_extensions=($(gh extension list)) 79 | wanted_gh_extensions=( 80 | mislav/gh-branch 81 | github/gh-copilot 82 | ) 83 | for extension_to_install in "${wanted_gh_extensions[@]}"; do 84 | found=false 85 | 86 | for installed_extension in "${installed_gh_extensions[@]}"; do 87 | if [[ "$installed_extension" = *"$extension_to_install"* ]]; then 88 | found=true 89 | fi 90 | done 91 | 92 | if [[ $found == true ]]; then 93 | found=false 94 | else 95 | gh extensions install $extension_to_install 96 | fi 97 | done 98 | 99 | all_done 100 | } 101 | 102 | teardown() { 103 | output "Cleaning up..." 104 | 105 | IFS=$' \t\n' 106 | 107 | all_done 108 | } 109 | 110 | install_homebrew 111 | install_xcode_select 112 | brew_bundle 113 | 114 | install_dotfiles 115 | install_plugin_managers 116 | install_rdm 117 | install_gh_extensions 118 | 119 | teardown 120 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/lsp-config.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "williamboman/mason.nvim", 4 | dependencies = { 5 | "williamboman/mason-lspconfig.nvim", 6 | "WhoIsSethDaniel/mason-tool-installer.nvim", 7 | }, 8 | config = function() 9 | local mason = require("mason") 10 | local mason_lspconfig = require("mason-lspconfig") 11 | local mason_tool_installer = require("mason-tool-installer") 12 | mason.setup({}) 13 | 14 | mason_lspconfig.setup({ 15 | ensure_installed = { 16 | "cssls", 17 | "html", 18 | "lua_ls", 19 | "ts_ls", 20 | }, 21 | }) 22 | 23 | mason_tool_installer.setup({ 24 | ensure_installed = { 25 | "prettier", 26 | "stylua", 27 | "eslint_d", 28 | "proselint", 29 | }, 30 | }) 31 | end, 32 | }, 33 | { 34 | "neovim/nvim-lspconfig", 35 | event = { "BufReadPre", "BufNewFile" }, 36 | dependencies = { 37 | "hrsh7th/cmp-nvim-lsp", 38 | { "antosha417/nvim-lsp-file-operations", config = true }, 39 | { "folke/neodev.nvim", opts = {} }, 40 | }, 41 | config = function() 42 | local lspconfig = require("lspconfig") 43 | local mason_lspconfig = require("mason-lspconfig") 44 | local cmp_nvim_lsp = require("cmp_nvim_lsp") 45 | local keymap = vim.keymap 46 | 47 | vim.api.nvim_create_autocmd("LspAttach", { 48 | group = vim.api.nvim_create_augroup("UserLspConfig", {}), 49 | callback = function(event) 50 | local opts = { buffer = event.buf, silent = true } 51 | 52 | opts.desc = "Show LSP references" 53 | keymap.set("n", "gR", "FzfLua lsp_references", opts) 54 | 55 | opts.desc = "Go to declaration" 56 | keymap.set("n", "gD", vim.lsp.buf.declaration, opts) 57 | 58 | opts.desc = "Show LSP definitions" 59 | keymap.set("n", "gd", "FzfLua lsp_definitions", opts) 60 | 61 | opts.desc = "Show LSP implementations" 62 | keymap.set("n", "gi", "FzfLua lsp_implementations", opts) 63 | 64 | opts.desc = "Show LSP type definitions" 65 | keymap.set("n", "gt", "FzfLua lsp_type_definitions", opts) 66 | 67 | opts.desc = "See available code actions" 68 | keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) 69 | 70 | opts.desc = "Smart rename" 71 | keymap.set("n", "cr", vim.lsp.buf.rename, opts) 72 | 73 | opts.desc = "Show line diagnostics" 74 | keymap.set("n", "d", vim.diagnostic.open_float, opts) 75 | 76 | opts.desc = "Go to previous diagnostic" 77 | keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) 78 | 79 | opts.desc = "Go to next diagnostic" 80 | keymap.set("n", "]d", vim.diagnostic.goto_next, opts) 81 | 82 | opts.desc = "Show documentation for what is under cursor" 83 | keymap.set("n", "K", vim.lsp.buf.hover, opts) 84 | end, 85 | }) 86 | 87 | local capabilities = cmp_nvim_lsp.default_capabilities() 88 | 89 | mason_lspconfig.setup_handlers({ 90 | function(server_name) 91 | lspconfig[server_name].setup({ 92 | capabilities = capabilities, 93 | }) 94 | end, 95 | }) 96 | end, 97 | }, 98 | } 99 | -------------------------------------------------------------------------------- /zshrc: -------------------------------------------------------------------------------- 1 | # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. 2 | # Initialization code that may require console input (password prompts, [y/n] 3 | # confirmations, etc.) must go above this block; everything else may go below. 4 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then 5 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" 6 | fi 7 | 8 | ### ENV 9 | export CLICOLOR=1 10 | export VISUAL=vim 11 | export EDITOR=vim 12 | export CODE="$HOME"/src 13 | 14 | ### Custom completions 15 | fpath=("$HOME"/.zsh/completion $fpath) 16 | autoload -U compinit 17 | compinit 18 | 19 | ### Custom functions 20 | for file in $(find "$HOME"/.zsh/functions -maxdepth 1); do 21 | source $file 22 | done 23 | 24 | ### Aliases 25 | alias dotfiles='cd "$HOME"/dotfiles' 26 | alias g='git' 27 | alias gs='git status -sb' 28 | alias ga='git add' 29 | alias gc='git commit' 30 | alias be='bundle exec' 31 | alias rc='rails console' 32 | alias rs='rails server' 33 | alias ivm='vim $(fzf -m --preview "bat {} --color=always")' 34 | alias sourcerc='source ~/.zshrc' 35 | alias cl='clear' 36 | alias wezkeys='wezterm show-keys' 37 | 38 | ### Path 39 | PATH="/opt/homebrew/bin:$PATH" 40 | PATH="$HOME/.cargo/bin:$PATH" 41 | PATH="$HOME/.bin:$PATH" 42 | 43 | ### History 44 | setopt INC_APPEND_HISTORY 45 | setopt HIST_IGNORE_ALL_DUPS 46 | setopt SHARE_HISTORY 47 | HISTSIZE=4096 48 | SAVEHIST=4096 49 | 50 | 51 | ### Editor 52 | if command -v nvim &> /dev/null; then 53 | export EDITOR=nvim 54 | export VISUAL=nvim 55 | alias vim=nvim 56 | fi 57 | 58 | ### Rust 59 | export CARGO_HOME="$HOME/.cargo" 60 | export RUSTUP_HOME="$CARGO_HOME" 61 | export PATH="$CARGO_HOME/bin:$PATH" 62 | 63 | ### Version Management 64 | if command -v mise &> /dev/null; then 65 | eval "$(mise activate zsh)" 66 | eval "$(mise completion zsh)" 67 | alias tools="mise ls --current" 68 | fi 69 | 70 | ## allow local shims to override in trusted projects 71 | PATH=".git/safe/../../bin:$PATH" 72 | 73 | ### fzf 74 | export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git" 75 | export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" 76 | export FZF_ALT_C_COMMAND="fd --type d --hidden --strip-cwd-prefix --exclude .git" 77 | 78 | _fzf_compgen_path() { 79 | fd --hidden --exclude .git . "$1" 80 | } 81 | 82 | _fzf_compgen_dir() { 83 | fd --type d --hidden --exclude .git . "$1" 84 | } 85 | 86 | ### Prompt 87 | if [[ -f /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme ]]; then 88 | source /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme 89 | else 90 | autoload -U promptinit && promptinit 91 | prompt adam1 92 | fi 93 | 94 | ### Yazi 95 | if command -v yazi &> /dev/null; then 96 | function y() { 97 | local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" 98 | yazi "$@" --cwd-file="$tmp" 99 | if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then 100 | builtin cd -- "$cwd" 101 | fi 102 | rm -f -- "$tmp" 103 | } 104 | fi 105 | 106 | ### eza 107 | if command -v eza &> /dev/null; then 108 | export EZA_ICON_SPACING=2 109 | export EZA_ICONS_AUTO=1 110 | alias ls='eza --oneline --all' 111 | fi 112 | 113 | ### thefuck 114 | if command -v thefuck &> /dev/null; then 115 | eval $(thefuck --alias) 116 | fi 117 | 118 | ### cat -> bat 119 | if command -v bat &> /dev/null; then 120 | alias cat=bat 121 | fi 122 | 123 | ### Codespaces 124 | if [[ -n "$CODESPACES" ]] ; then 125 | gh config set browser "rdm open" 126 | git config --global gpg.program "/.codespaces/bin/gh-gpgsign" 127 | 128 | alias pbcopy="rdm copy" 129 | alias open="rdm open" 130 | alias xdg-open="rdm open" 131 | else 132 | if command -v fzf &> /dev/null; then 133 | source <(fzf --zsh) 134 | fi 135 | fi 136 | 137 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 138 | 139 | # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. 140 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh 141 | -------------------------------------------------------------------------------- /config/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") 2 | local config = wezterm.config_builder() 3 | local act = wezterm.action 4 | 5 | -- Leader is CTRL + s, like I set in my tmux config 6 | config.leader = { key = "s", mods = "CTRL", timeout_milliseconds = 500 } 7 | 8 | -- Helper function to enter resize mode 9 | -- performs ther first size adjustment then enters the resize mode key table 10 | local resize_increment = 5 11 | local function enterResizeMode(direction) 12 | return act.Multiple({ 13 | act.AdjustPaneSize({ direction, resize_increment }), 14 | act.ActivateKeyTable({ 15 | name = "resize_mode", 16 | one_shot = false, 17 | timeout_milliseconds = 500, 18 | until_unknown = true, 19 | replace_current = true, 20 | }), 21 | }) 22 | end 23 | 24 | local function isViProcess(pane) 25 | local process_name = pane:get_foreground_process_name() 26 | local title = pane:get_title() 27 | return process_name:find("n?vim") ~= nil or title:find("n?vim") ~= nil 28 | end 29 | 30 | local function conditionalActivatePane(window, pane, pane_direction, vim_direction) 31 | if isViProcess(pane) then 32 | window:perform_action(act.SendKey({ key = vim_direction, mods = "CTRL" }), pane) 33 | else 34 | window:perform_action(act.ActivatePaneDirection(pane_direction), pane) 35 | end 36 | end 37 | 38 | wezterm.on("ActivatePaneDirection-right", function(window, pane) 39 | conditionalActivatePane(window, pane, "Right", "l") 40 | end) 41 | 42 | wezterm.on("ActivatePaneDirection-left", function(window, pane) 43 | conditionalActivatePane(window, pane, "Left", "h") 44 | end) 45 | 46 | wezterm.on("ActivatePaneDirection-up", function(window, pane) 47 | conditionalActivatePane(window, pane, "Up", "k") 48 | end) 49 | 50 | wezterm.on("ActivatePaneDirection-down", function(window, pane) 51 | conditionalActivatePane(window, pane, "Down", "j") 52 | end) 53 | 54 | -- Key table for resize mode (allows repeating keypresses to resize the pane) 55 | config.key_tables = { 56 | resize_mode = { 57 | { key = "H", action = act.AdjustPaneSize({ "Left", resize_increment }) }, 58 | { key = "J", action = act.AdjustPaneSize({ "Down", resize_increment }) }, 59 | { key = "K", action = act.AdjustPaneSize({ "Up", resize_increment }) }, 60 | { key = "L", action = act.AdjustPaneSize({ "Right", resize_increment }) }, 61 | }, 62 | } 63 | 64 | config.keys = { 65 | -- Splitting panes 66 | { mods = "LEADER", key = "-", action = act.SplitVertical({ domain = "CurrentPaneDomain" }) }, 67 | { mods = "LEADER", key = "\\", action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }) }, 68 | 69 | -- Zoom pane 70 | { mods = "LEADER", key = "z", action = act.TogglePaneZoomState }, 71 | 72 | -- rotate panes 73 | { mods = "LEADER", key = "}", action = act.RotatePanes("Clockwise") }, 74 | { mods = "LEADER", key = "{", action = act.RotatePanes("CounterClockwise") }, 75 | 76 | -- activate copy mode or vim mode 77 | { key = "[", mods = "LEADER", action = act.ActivateCopyMode }, 78 | 79 | -- move panes 80 | { key = "h", mods = "LEADER", action = act.ActivatePaneDirection("Left") }, 81 | { key = "j", mods = "LEADER", action = act.ActivatePaneDirection("Down") }, 82 | { key = "k", mods = "LEADER", action = act.ActivatePaneDirection("Up") }, 83 | { key = "l", mods = "LEADER", action = act.ActivatePaneDirection("Right") }, 84 | { key = "h", mods = "CTRL", action = act.EmitEvent("ActivatePaneDirection-left") }, 85 | { key = "j", mods = "CTRL", action = act.EmitEvent("ActivatePaneDirection-down") }, 86 | { key = "k", mods = "CTRL", action = act.EmitEvent("ActivatePaneDirection-up") }, 87 | { key = "l", mods = "CTRL", action = act.EmitEvent("ActivatePaneDirection-right") }, 88 | 89 | -- resize panes (allows repeating keypresses) 90 | { key = "H", mods = "LEADER", action = enterResizeMode("Left") }, 91 | { key = "J", mods = "LEADER", action = enterResizeMode("Down") }, 92 | { key = "K", mods = "LEADER", action = enterResizeMode("Up") }, 93 | { key = "L", mods = "LEADER", action = enterResizeMode("Right") }, 94 | 95 | -- rename tab 96 | { 97 | key = ",", 98 | mods = "LEADER", 99 | action = act.PromptInputLine({ 100 | description = "Tab name: ", 101 | action = wezterm.action_callback(function(window, _, line) 102 | if line then 103 | window:active_tab():set_title(line) 104 | end 105 | end), 106 | }), 107 | }, 108 | 109 | -- navigate tabs 110 | { key = "n", mods = "LEADER", action = act.ActivateTabRelative(1) }, 111 | { key = "p", mods = "LEADER", action = act.ActivateTabRelative(-1) }, 112 | { key = "s", mods = "LEADER|CTRL", action = act.ActivateLastTab }, 113 | 114 | -- create tab 115 | { key = "c", mods = "LEADER", action = act.SpawnTab("CurrentPaneDomain") }, 116 | } 117 | 118 | -- Tab switching by number 119 | for i = 1, 9 do 120 | table.insert(config.keys, { 121 | key = tostring(i), 122 | mods = "LEADER", 123 | action = act.ActivateTab(i - 1), 124 | }) 125 | end 126 | 127 | -- Theme 128 | config.color_scheme = "Dracula (Official)" 129 | config.use_fancy_tab_bar = false 130 | config.window_decorations = "RESIZE" 131 | config.tab_max_width = 20 132 | 133 | -- Font 134 | config.font = wezterm.font("MesloLGS NF") 135 | config.font_size = 16 136 | 137 | -- Disable audible bell 138 | config.audible_bell = "Disabled" 139 | 140 | -- When closing a tab, switch to the last active tab 141 | config.switch_to_last_active_tab_when_closing_tab = true 142 | 143 | return config 144 | -------------------------------------------------------------------------------- /vimrc: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | 3 | let mapleader = " " 4 | 5 | set backspace=2 " Backspace deletes like most programs in insert mode 6 | set noshowmode " powerline shows the mode 7 | set hlsearch " highlight searches (:noh to turn off) 8 | set ignorecase " case insensitive searching 9 | set smartcase " overrides ignorecase when pattern contains caps 10 | set laststatus=2 " Always display the status line 11 | set winwidth=80 " minimum width for active split 12 | set clipboard=unnamed " use OS clipboard 13 | set ruler " show the cursor position all the time 14 | set showcmd " display incomplete commands 15 | set incsearch " do incremental searching 16 | set laststatus=2 " Always display the status line 17 | set autowrite " Automatically :write before running commands 18 | set nofoldenable " I really don't like folding in vim 19 | set nobackup " don't create backup files 20 | set nowritebackup " really don't create backup files? 21 | set noswapfile " for real, don't create backup files 22 | set history=50 23 | 24 | " Whitespace stuff 25 | set tabstop=2 26 | set shiftwidth=2 27 | set shiftround 28 | set expandtab 29 | set nowrap 30 | set nojoinspaces 31 | 32 | " Make it obvious where 80 characters is 33 | set textwidth=80 34 | set colorcolumn=+1 35 | 36 | " Numbers 37 | set number 38 | set numberwidth=5 39 | 40 | " Open new split panes to right and bottom, which feels more natural 41 | set splitbelow 42 | set splitright 43 | 44 | " Set spellfile to location that is guaranteed to exist 45 | set spellfile=$HOME/.vim-spell-en.utf-8.add 46 | 47 | " Autocomplete with dictionary words when spell check is on 48 | set complete+=kspell 49 | 50 | " Always use vertical diffs 51 | set diffopt+=vertical 52 | 53 | " Switch syntax highlighting on, when the terminal has colors 54 | " Also switch on highlighting the last used search pattern. 55 | if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on") 56 | syntax on 57 | endif 58 | 59 | if filereadable(expand("~/.vimrc.bundles")) 60 | source ~/.vimrc.bundles 61 | endif 62 | 63 | " Load matchit.vim, but only if the user hasn't installed a newer version. 64 | if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' 65 | runtime! macros/matchit.vim 66 | endif 67 | 68 | filetype plugin indent on 69 | 70 | " Color scheme 71 | set termguicolors 72 | let ayucolor="light" 73 | " let ayucolor="mirage" 74 | " let ayucolor="dark" 75 | 76 | colorscheme dracula 77 | " colorshceme ayu 78 | " colorscheme monokai_pro 79 | " colorscheme github 80 | 81 | 82 | " vim hardcodes background color erase even if the terminfo file does 83 | " not contain bce (not to mention that libvte based terminals 84 | " incorrectly contain bce in their terminfo files). This causes 85 | " incorrect background rendering when using a color theme with a 86 | " background color. 87 | let &t_ut='' 88 | 89 | augroup vimrcEx 90 | autocmd! 91 | 92 | " When editing a file, always jump to the last known cursor position. 93 | " Don't do it for commit messages, when the position is invalid, or when 94 | " inside an event handler (happens when dropping a file on gvim). 95 | autocmd BufReadPost * 96 | \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | 97 | \ exe "normal g`\"" | 98 | \ endif 99 | 100 | " Set syntax highlighting for specific file types 101 | autocmd BufRead,BufNewFile *.md set filetype=markdown 102 | autocmd BufRead,BufNewFile .{jscs,jshint,eslint}rc set filetype=json 103 | 104 | " File Type Settings 105 | autocmd filetype qf setlocal wrap 106 | 107 | " Help System Speedups 108 | autocmd filetype help nnoremap 109 | autocmd filetype help nnoremap 110 | autocmd filetype help nnoremap q :q 111 | autocmd filetype help set nonumber 112 | augroup END 113 | 114 | " git shortcuts 115 | noremap gb :Git blame 116 | noremap gd :Git diff 117 | 118 | " simple vertical splits 119 | map v v 120 | 121 | " Mappings for quick search & replace. 122 | " Do a / search first, then leave pattern empty in :s// to use last 123 | map sra :%s///g 124 | map src :%s///gc 125 | 126 | " Hide highlighted terms 127 | map :noh 128 | 129 | " Switch between the last two files 130 | nnoremap 131 | 132 | " vim-test mappings 133 | nnoremap a :TestFile 134 | nnoremap t :TestNearest 135 | nnoremap l :TestLast 136 | nnoremap A :TestSuite 137 | nnoremap gt :TestVisit 138 | 139 | " Treat
  • and

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