# Path to your oh-my-zsh installation. ZSH=/usr/share/oh-my-zsh/ # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" # Uncomment the following line to use hyphen-insensitive completion. # Case-sensitive completion must be off. _ and - will be interchangeable. HYPHEN_INSENSITIVE="true" # Uncomment the following line to enable command auto-correction. ENABLE_CORRECTION="true" plugins=(git-prompt sudo zsh-autosuggestions zsh-shift-select) ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh if [[ ! -d $ZSH_CACHE_DIR ]]; then mkdir $ZSH_CACHE_DIR fi # If not running interactively, don't do anything [[ $- != *i* ]] && exit source $HOME/.zaliases # Disable bell unsetopt autocd beep # Enable case-insensitive auto completion autoload -Uz compinit && compinit zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' # Set prompt PROMPT="%B%F{198}%n%F{015}@%F{014}%m%F{015}:%F{198}%~%F{015}> %b%f" #autoload -Uz promptinit && promptinit # History settings HISTFILE=~/.zhistory HISTSIZE=10000 SAVEHIST=10000 setopt appendhistory setopt extended_history setopt share_history setopt inc_append_history setopt hist_find_no_dups setopt hist_reduce_blanks # Enable case-insensitive globbing setopt no_case_glob setopt glob_complete autoload -Uz up-line-or-beginning-search down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search # Import colorscheme from 'wal' asynchronously # & # Run the process in the background. # # ( ) # Hide shell job control messages. # # Not supported in the "fish" shell. (cat ~/.cache/wal/sequences &) # # To add support for TTYs this line can be optionally added. source ~/.cache/wal/colors-tty.sh # create a zkbd compatible hash; # to add other keys to this hash, see: man 5 terminfo typeset -g -A key key[Home]="${terminfo[khome]}" key[End]="${terminfo[kend]}" key[Insert]="${terminfo[kich1]}" key[Backspace]="${terminfo[kbs]}" key[Delete]="${terminfo[kdch1]}" key[Up]="${terminfo[kcuu1]}" key[Down]="${terminfo[kcud1]}" key[Left]="${terminfo[kcub1]}" key[Right]="${terminfo[kcuf1]}" key[PageUp]="${terminfo[kpp]}" key[PageDown]="${terminfo[knp]}" key[Shift-Tab]="${terminfo[kcbt]}" key[Control-Left]="${terminfo[kLFT5]}" key[Control-Right]="${terminfo[kRIT5]}" key[Control-Backspace]="^H" key[Control-Delete]="^5" # Setup key accordingly bindkey -- "${key[Home]}" beginning-of-line bindkey -- "${key[End]}" end-of-line bindkey -- "${key[Insert]}" overwrite-mode bindkey -- "${key[Backspace]}" backward-delete-char bindkey -- "${key[Delete]}" delete-char bindkey -- "${key[Up]}" up-line-or-history bindkey -- "${key[Down]}" down-line-or-history bindkey -- "${key[Left]}" backward-char bindkey -- "${key[Right]}" forward-char bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history bindkey -- "${key[PageDown]}" end-of-buffer-or-history bindkey -- "${key[Shift-Tab]}" reverse-menu-complete bindkey -- "${key[Up]}" up-line-or-beginning-search bindkey -- "${key[Down]}" down-line-or-beginning-search bindkey -- "${key[Control-Left]}" backward-word bindkey -- "${key[Control-Right]}" forward-word bindkey -- "${key[Control-Delete]}" kill-word bindkey -M emacs "${key[Control-Backspace]}" backward-kill-word bindkey -M viins "${key[Control-Backspace]}" backward-kill-word bindkey -M vicmd "${key[Control-Backspace]}" backward-kill-word # Finally, make sure the terminal is in application mode, when zle is # active. Only then are the values from $terminfo valid. if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then autoload -Uz add-zle-hook-widget function zle_application_mode_start { echoti smkx } function zle_application_mode_stop { echoti rmkx } add-zle-hook-widget -Uz zle-line-init zle_application_mode_start add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop fi source $ZSH/oh-my-zsh.sh