diff --git a/.zshrc b/.zshrc index 9733c2e..4dc7f2e 100644 --- a/.zshrc +++ b/.zshrc @@ -1,4 +1,3 @@ - # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH @@ -60,11 +59,10 @@ plugins=( zsh-syntax-highlighting ) - # User configuration # --------------------------------------------------------------------------------------------------------------------- # ==> Source External Configs -# +# source $ZSH/oh-my-zsh.sh source $HOME/.zsh_aliases source $HOME/.zsh_functions @@ -74,7 +72,7 @@ source $HOME/.zsh_functions # --------------------------------------------------------------------------------------------------------------------- # ==> History -# +# HISTFILE=$HOME/.zsh_history HISTSIZE=50000 SAVEHIST=50000 @@ -93,47 +91,59 @@ setopt share_history # --------------------------------------------------------------------------------------------------------------------- # ==> KEY BINDINGS - from https://dougblack.io/words/zsh-vi-mode.html +# Commented out on 2021-02-09 in favor of learning emacs bindings # -bindkey -v -bindkey '^P' up-history -bindkey '^N' down-history -bindkey '^?' backward-delete-char -bindkey '^h' backward-delete-char -bindkey '^w' backward-kill-word -bindkey '^r' history-incremental-search-backward - -bindkey "\e[1~" beginning-of-line -bindkey "\e[4~" end-of-line -bindkey "\e[5~" beginning-of-history -bindkey "\e[6~" end-of-history -bindkey "\e[3~" delete-char -bindkey "\e[2~" quoted-insert -bindkey "\e[5C" forward-word -bindkey "\eOc" emacs-forward-word -bindkey "\e[5D" backward-word -bindkey "\eOd" emacs-backward-word -bindkey "\ee[C" forward-word -bindkey "\ee[D" backward-word - -bindkey "^H" backward-delete-word +#bindkey -v +#bindkey '^P' up-history +#bindkey '^N' down-history +#bindkey '^?' backward-delete-char +#bindkey '^h' backward-delete-char +#bindkey '^w' backward-kill-word +#bindkey '^r' history-incremental-search-backward +# +#bindkey "\e[1~" beginning-of-line +#bindkey "\e[4~" end-of-line +#bindkey "\e[5~" beginning-of-history +#bindkey "\e[6~" end-of-history +#bindkey "\e[3~" delete-char +#bindkey "\e[2~" quoted-insert +#bindkey "\e[5C" forward-word +#bindkey "\eOc" emacs-forward-word +#bindkey "\e[5D" backward-word +#bindkey "\eOd" emacs-backward-word +#bindkey "\ee[C" forward-word +#bindkey "\ee[D" backward-word +# +#bindkey "^H" backward-delete-word +# --------------------------------------------------------------------------------------------------------------------- +# ==> KEY BINDINGS - EMACS bindings because I work on lots of different machines +# so I should get used to the defaults +# +bindkey -e +setopt interactivecomments export KEYTIMEOUT=1 - # --------------------------------------------------------------------------------------------------------------------- # ==> FZF -# +# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # Include hidden files export FZF_DEFAULT_COMMAND='find .' # --------------------------------------------------------------------------------------------------------------------- -# ==> set PATH so it includes user's private ~/bin if it exists -PATH="$HOME/.local/bin:$HOME/bin:$PATH" +# ==> set PATH so it includes user's private ~/bin if present +PATH="$PATH:$HOME/.local/bin:$HOME/bin" +# --------------------------------------------------------------------------------------------------------------------- +# ==> set PATH so it includes /usr/games if present +PATH="$PATH:/usr/games" + +# --------------------------------------------------------------------------------------------------------------------- +# ==> Powerlevel10k https://github.com/romkatv/powerlevel10k +# # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh - # 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. @@ -141,8 +151,14 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi -# Enable rootless control of virsh, if installed +# --------------------------------------------------------------------------------------------------------------------- +# ==> Enable rootless control of virsh, if installed +# if [[ -f /usr/bin/virsh ]]; then export LIBVIRT_DEFAULT_URI=qemu:///system fi +# --------------------------------------------------------------------------------------------------------------------- +# ==> Show me a fortune tux when I log in! +# +fortune -a | cowsay -f tux