diff --git a/README.md b/README.md index e281921..ca4ca01 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,9 @@ I use [Homebrew Bundle](https://github.com/Homebrew/homebrew-bundle) for most of GruvBox iTerm2 color scheme. Download it, open it, then set it as your profile's color scheme: +I use the "MesoLGS Nerd Font" in iTerm2 which is in the `/Meslo/MesloLGSNerdFont-Regular.ttf` file from the `Meslo.tar.xz` release archive. -I use the MesloLG Nerd fonts: - -1. https://www.nerdfonts.com/font-downloads -- https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.3/Meslo.zip +1. https://www.nerdfonts.com/font-downloads -- https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Meslo.tar.xz ![](screenshots/iterm_text_options.png) diff --git a/home/.p10k.zsh b/home/.p10k.zsh index b4fb48b..423f24b 100644 --- a/home/.p10k.zsh +++ b/home/.p10k.zsh @@ -1,8 +1,8 @@ -# Generated by Powerlevel10k configuration wizard on 2023-04-19 at 14:10 PDT. -# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 53641. -# Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode, -# 24h time, angled separators, sharp heads, flat tails, 1 line, compact, few icons, -# concise, instant_prompt=verbose. +# Generated by Powerlevel10k configuration wizard on 2024-05-22 at 13:07 PDT. +# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 44011. +# Wizard options: nerdfont-v3 + powerline, large icons, rainbow, unicode, 24h time, +# angled separators, sharp heads, flat tails, 1 line, compact, few icons, concise, +# instant_prompt=off. # Type `p10k configure` to generate another config. # # Config for Powerlevel10k with powerline prompt style with colorful background. @@ -84,12 +84,14 @@ context # user@hostname nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) ranger # ranger shell (https://github.com/ranger/ranger) + yazi # yazi shell (https://github.com/sxyazi/yazi) nnn # nnn shell (https://github.com/jarun/nnn) lf # lf shell (https://github.com/gokcehan/lf) xplr # xplr shell (https://github.com/sayanarijit/xplr) vim_shell # vim shell indicator (:sh) midnight_commander # midnight commander shell (https://midnight-commander.org/) nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) + chezmoi_shell # chezmoi shell (https://www.chezmoi.io/) vi_mode # vi mode (you don't need this if you've enabled prompt_char) # vpn_ip # virtual private network indicator # load # CPU load @@ -99,6 +101,7 @@ todo # todo items (https://github.com/todotxt/todo.txt-cli) timewarrior # timewarrior tracking status (https://timewarrior.net/) taskwarrior # taskwarrior task count (https://taskwarrior.org/) + per_directory_history # Oh My Zsh per-directory-history local/global indicator # cpu_arch # CPU architecture time # current time # ip # ip address and bandwidth usage for a specified network interface @@ -110,10 +113,10 @@ ) # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. - typeset -g POWERLEVEL9K_MODE=nerdfont-complete + typeset -g POWERLEVEL9K_MODE=nerdfont-v3 # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. - typeset -g POWERLEVEL9K_ICON_PADDING=none + typeset -g POWERLEVEL9K_ICON_PADDING=moderate # When set to true, icons appear before content on both sides of the prompt. When set # to false, icons go after content. If empty or not set, icons go before content in the left @@ -166,6 +169,9 @@ typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' # Separator between different-color segments on the right. typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' + # To remove a separator between two segments, add "_joined" to the second segment name. + # For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined) + # The right end of left prompt. typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' # The left end of right prompt. @@ -238,7 +244,7 @@ .java-version .perl-version .php-version - .tool-version + .tool-versions .shorten_folder_marker .svn .terraform @@ -425,11 +431,17 @@ res+=" ${modified}wip" fi - # ⇣42 if behind the remote. - (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" - # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. - (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" + fi + # ⇠42 if behind the push remote. (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " @@ -737,7 +749,14 @@ typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - + + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### + # Yazi shell color. + typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3 + typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0 + # Custom icon. + # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### # Nnn shell color. typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 @@ -778,12 +797,22 @@ typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 + # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store. + # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false + # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= # Custom icon. # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]################## + # chezmoi shell color. + typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=0 + typeset -g POWERLEVEL9K_CHEZMOI_SHELL_BACKGROUND=4 + # Custom icon. + # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + ##################################[ disk_usage: disk usage ]################################## # Colors for different levels of disk usage. typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 @@ -815,6 +844,8 @@ # Text and color for insert vi mode. typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 + # Custom icon. + # typeset -g POWERLEVEL9K_VI_MODE_VISUAL_IDENTIFIER_EXPANSION='⭐' ######################################[ ram: free RAM ]####################################### # RAM color. @@ -905,6 +936,21 @@ # Custom icon. # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]####### + # Color when using local/global history. + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=0 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_BACKGROUND=5 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=0 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_BACKGROUND=3 + + # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION='' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION='' + + # Custom icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + ################################[ cpu_arch: CPU architecture ]################################ # CPU architecture color. typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0 @@ -1051,6 +1097,11 @@ # Nvm color. typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 + # If set to false, hide node version if it's the same as default: + # $(nvm version current) == $(nvm version default). + typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true # Custom icon. # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' @@ -1319,7 +1370,7 @@ #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# # Show kubecontext only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show kubecontext. - typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor' + 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' # Kubernetes context classes for the purpose of using different colors, icons and expansions with # different contexts. @@ -1408,7 +1459,7 @@ #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# # Show aws only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show aws. - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element # in each pair defines a pattern against which the current AWS profile gets matched. @@ -1458,11 +1509,41 @@ # Show azure only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show azure. typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current azure account name gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current azure account is "company_test", its class is TEST because "company_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2 + # typeset -g POWERLEVEL9K_AZURE_TEST_BACKGROUND=0 + # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + # Azure account name color. - typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7 - typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4 + typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=7 + typeset -g POWERLEVEL9K_AZURE_OTHER_BACKGROUND=4 # Custom icon. - # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### # Show gcloud only when the command you are typing invokes one of these tools. @@ -1635,7 +1716,7 @@ # Show battery in yellow when it's discharging. typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 # Battery pictograms going from low to high level of charge. - typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' + typeset -g POWERLEVEL9K_BATTERY_STAGES='\UF008E\UF007A\UF007B\UF007C\UF007D\UF007E\UF007F\UF0080\UF0081\UF0082\UF0079' # Don't show the remaining time to charge/discharge. typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0 @@ -1694,7 +1775,7 @@ # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # is to generate the prompt segment for display in instant prompt. See - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k @@ -1731,11 +1812,11 @@ # it incompatible with your zsh configuration files. # - quiet: Enable instant prompt and don't print warnings when detecting console output # during zsh initialization. Choose this if you've read and understood - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # - verbose: Enable instant prompt and print a warning when detecting console output during # zsh initialization. Choose this if you've never tried instant prompt, haven't # seen the warning, or if you are unsure what this all means. - typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + typeset -g POWERLEVEL9K_INSTANT_PROMPT=off # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload diff --git a/home/.vimrc b/home/.vimrc index 40aa155..2de93a0 100644 --- a/home/.vimrc +++ b/home/.vimrc @@ -5,11 +5,6 @@ if empty(glob(data_dir . '/autoload/plug.vim')) autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif -" PolyGot Settings -" For some reason polyglot requires this before loading the plugin :'( -"let g:polyglot_disabled = ['puppet', 'python', 'python-indent', 'python-compiler'] -let g:polyglot_disabled = ['puppet'] - " Vim Plug start call plug#begin(data_dir.'/plugged') @@ -17,8 +12,9 @@ call plug#begin(data_dir.'/plugged') Plug 'CopilotC-Nvim/CopilotChat.nvim', { 'branch': 'canary' } Plug 'Valloric/ListToggle' Plug 'airblade/vim-gitgutter' -Plug 'bling/vim-airline' +Plug 'akinsho/bufferline.nvim', { 'tag': '*' } Plug 'dense-analysis/ale' +Plug 'ellisonleao/gruvbox.nvim' Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'github/copilot.vim' Plug 'godlygeek/tabular' @@ -26,12 +22,11 @@ Plug 'hashivim/vim-terraform' Plug 'jjo/vim-cue' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' -Plug 'morhetz/gruvbox' Plug 'nvim-lua/plenary.nvim' +Plug 'nvim-lualine/lualine.nvim' +Plug 'nvim-tree/nvim-web-devicons' +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'preservim/nerdtree' -Plug 'rodjek/vim-puppet' -Plug 'ryanoasis/vim-devicons' -Plug 'sheerun/vim-polyglot' Plug 'tpope/vim-fugitive' call plug#end() diff --git a/home/.vimrc.settings b/home/.vimrc.settings index 0dfbfb0..26309c5 100644 --- a/home/.vimrc.settings +++ b/home/.vimrc.settings @@ -39,19 +39,54 @@ colorscheme gruvbox "}}} " PLUGIN OPTIONS {{{ -"vim-airline options -set laststatus=2 -let g:airline_powerline_fonts = 1 -let g:airline#extensions#tabline#enabled = 1 -let g:airline#extensions#tabline#fnamemod = ':t' -let g:airline#extensions#tabline#show_tab_type = 0 -let g:airline#extensions#tabline#buffer_min_count = 1 -let g:airline_skip_empty_sections = 1 -let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]' -let g:airline#extensions#branch#vcs_checks = [] " Prevent unnecessary 'git status' calls. - -" vim-markdown settings -let g:markdown_include_jekyll_support = 0 +" NOTE: inline lua heredocs break syntax highlighting for vimscript. Fix it by +" running the following from within vim: +" !curl -sS https://raw.githubusercontent.com/neovim/neovim/v0.7.2/runtime/syntax/lua.vim > $VIMRUNTIME/syntax/lua.vim +" See: https://github.com/neovim/neovim/issues/20456 + +" https://github.com/nvim-lualine/lualine.nvim +lua << EOF +require('lualine').setup { + options = { + theme = 'gruvbox', + }, + sections = { + lualine_c = { + -- https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options + { 'filename', path = 1 } + }, + }, + extensions = { + 'fugitive', + 'quickfix', + 'nerdtree' + } +} +EOF + +" https://github.com/akinsho/bufferline.nvim +" :h bufferline-configuration +lua << EOF +require("bufferline").setup{ + options = { + show_buffer_close_icons = false, + separator_style = "slant", + } +} +EOF + +" https://github.com/nvim-treesitter/nvim-treesitter +lua << EOF +require('nvim-treesitter.configs').setup { + -- Automatically install missing parsers when entering buffer. + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + -- Use treesitter highlighting. + highlight = { + enable = true, + }, +} +EOF " allows cursor change in tmux mode if exists('$TMUX') @@ -62,17 +97,10 @@ else let &t_EI = "\]50;CursorShape=0\x7" endif -" Git Gutter -highlight GitGutterAdd ctermbg=235 ctermfg=10 -highlight GitGutterChange ctermbg=235 ctermfg=208 -highlight GitGutterDelete ctermbg=235 ctermfg=9 -highlight GitGutterChangeDelete ctermbg=235 ctermfg=175 - " vim-go let g:go_template_autocreate = 0 " Disable auto-creation of template files " ALE Options -let g:airline#extensions#ale#enabled = 1 " Use the vim-airline integration let g:ale_completion_enabled = 1 let g:ale_go_golangci_lint_package = 1 " Run golangci-lint on the entire Go package let g:ale_lint_on_save = 0 @@ -117,8 +145,7 @@ let g:python_highlight_all = 1 " https://github.com/CopilotC-Nvim/CopilotChat.nvim lua << EOF require("CopilotChat").setup { - debug = true, -- Enable debugging - -- See Configuration section for rest + debug = true, } EOF @@ -187,20 +214,8 @@ augroup HighlightProblems \ call AddLiteralTabMatch() augroup END -" Highlight Colors -highlight Default ctermfg=1 -" Darker vertical line between splits. -highlight vertsplit ctermbg=235 ctermfg=239 -" Darker line numbers. -highlight LineNr ctermfg=239 " Highlight search terms with orange. -highlight Search ctermbg=235 ctermfg=166 -" Hide the sign column. -highlight SignColumn ctermbg=235 -" Hide the rows of '~' at the end of a document. -highlight EndOfBuffer ctermbg=235 ctermfg=235 -"highlight StatusLine ctermbg=245 ctermfg=235 -"highlight StatusLineNC ctermbg=237 ctermfg=235 +highlight Search ctermbg=235 ctermfg=166 " New vertical splits go to the right rather than the left set splitright diff --git a/home/.zshrc b/home/.zshrc index ab10f83..0bfd89e 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -2,10 +2,6 @@ __source_if_exists() { # sources a file if it exists [[ -f "$1" ]] && source "$1" } -# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. -# Initialization code that may require console input (password prompts, [y/n] -# confirmations, etc.) must go above this block, everything else may go below. -#__source_if_exists "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" # Prevent slow copy/paste of long commands: https://github.com/ohmyzsh/ohmyzsh/issues/6338 DISABLE_MAGIC_FUNCTIONS=true @@ -79,6 +75,17 @@ __source_if_exists ~/.p10k.zsh # Customizations to the p10k prompt (this must be after source ~/.p10k.zsh) POWERLEVEL9K_STATUS_OK=false # Only show return code status on failure, not success. +# Create a Powerlevel10k prompt segment that shows the value of $VAULT_ADDR if set. +function prompt_my_vault_addr() { + if [[ -n $VAULT_ADDR ]]; then + p10k segment -i 'LOCK_ICON' -r -f black -b cyan -t "$VAULT_ADDR" + fi +} +# Add it to the right prompt. +POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS+=my_vault_addr +# Only show it when running 'vault'. +typeset -g POWERLEVEL9K_MY_VAULT_ADDR_SHOW_ON_COMMAND='vault' + __source_if_exists ~/.fzf.zsh # fd is faster when searching with fzf (useful in vim with the fzf plugin and :Files command) @@ -99,17 +106,6 @@ export HOMEBREW_NO_ANALYTICS=true # https://github.com/sp-ricard-valverde/github-act-cache-server export ACT_CACHE_AUTH_KEY=helloworld -# Create a Powerlevel10k prompt segment that shows that value of $VAULT_ADDR if set. -function prompt_my_vault_addr() { - if [[ -n $VAULT_ADDR ]]; then - p10k segment -i 'LOCK_ICON' -r -f black -b cyan -t "$VAULT_ADDR" - fi -} -# Add it to the right prompt. -POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS+=my_vault_addr -# Only show it when running 'vault'. -typeset -g POWERLEVEL9K_MY_VAULT_ADDR_SHOW_ON_COMMAND='vault' - eval "$(direnv hook zsh)" # Prevent duplicate entries from beting added to PATH. Must be at the end of zshrc. diff --git a/screenshots/iterm_text_options.png b/screenshots/iterm_text_options.png index 83af923..50e2c02 100644 Binary files a/screenshots/iterm_text_options.png and b/screenshots/iterm_text_options.png differ