diff --git a/zsh/zshrc b/zsh/zshrc index 02d4891..db5a379 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,3 +1,10 @@ +# 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. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + # start the x server if we're on tty0 and nothing is running [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx @@ -9,6 +16,11 @@ if [[ ! -a ~/.antigen.zsh ]]; then wget https://git.io/antigen -O ~/.antigen.zsh fi +# Add .local/bin +if [[ ! "$PATH" =~ "$HOME/.local/bin" ]]; then + export PATH="$HOME/.local/bin:$PATH" +fi + # powerlevel9k config POWERLEVEL9K_INSTALLATION_PATH=$ANTIGEN_BUNDLES/bhilburn/powerlevel9k POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(status root_indicator context dir virtualenv vcs) @@ -37,7 +49,6 @@ antigen use oh-my-zsh # plugins from oh-my-zsh antigen bundle git -antigen bundle pipenv # plugins from other repos antigen bundle zsh-users/zsh-autosuggestions @@ -45,14 +56,20 @@ antigen bundle zsh-users/zsh-syntax-highlighting # set the theme #antigen theme agnoster -antigen theme bhilburn/powerlevel9k powerlevel9k +antigen theme romkatv/powerlevel10k # finish up antigen apply +# zsh autosuggestions +ZSH_AUTOSUGGEST_STRATEGY=(history completion) + # Preferred Editor export EDITOR="vim" # commands aliases alias svim="sudoedit" alias unlock="gpg -o /dev/null -s /dev/null" + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh