dotfiles/dot_zshrc
2021-10-23 14:08:13 +02:00

60 lines
1.7 KiB
Text

# https://github.com/romkatv/zsh4humans/blob/v5/README.md (tmux: integrated, system, no)
zstyle ':z4h:' start-tmux 'no'
# keyboard setting
zstyle ':z4h:bindkey' keyboard 'pc'
zstyle ':z4h:autosuggestions' forward-char 'accept'
zstyle ':z4h:fzf-complete' recurse-dirs 'no'
# automatic teleportation of z4h to ssh (yes, no) example: zstyle ':z4h:ssh:example-hostname1' enable 'yes'
zstyle ':z4h:ssh:*' enable 'no'
z4h install ohmyzsh/ohmyzsh || return
z4h install urbainvaes/fzf-marks || return
z4h install mroth/evalcache || return
# initialize z4h (no network stuff after here)
z4h init || return
# exports
z4h source -c $HOME/.config/zsh/export.zsh
z4h source -c $HOME/.config/local/env.zsh
# plugins (ohmyzsh)
z4h source -c $OMZL/history.zsh
z4h source -c $OMZL/completion.zsh
z4h source -c $OMZL/directories.zsh
z4h source -c $OMZL/clipboard.zsh
z4h source -c $OMZL/grep.zsh
z4h source -c $OMZP/command-not-found/command-not-found.plugin.zsh
z4h source -c $OMZP/extract/extract.plugin.zsh
# plugins (self)
z4h source -c $Z4H/urbainvaes/fzf-marks/fzf-marks.plugin.zsh
z4h source -c $Z4H/mroth/evalcache/evalcache.plugin.zsh
#zinit pack for ls_colors
# zoxide
_evalcache zoxide init zsh
# aliases
z4h source -c $HOME/.config/zsh/aliases.zsh
z4h source -c $HOME/.config/local/aliases.zsh
# key bindings
run_ranger () { echo; ranger < $TTY; zle redisplay }
zle -N run_ranger
bindkey '^f' run_ranger
# ssh stuff
z4h source -c $HOME/.config/zsh/sshagent.zsh
z4h source -c $HOME/.config/zsh/sshcompfix.zsh
# Define named directories: ~wsl <=> Windows home directory on WSL.
[[ -z $z4h_win_home ]] || hash -d wsl=$z4h_win_home
# Set shell options: http://zsh.sourceforge.net/Doc/Release/Options.html
setopt prompt_subst inc_append_history
z4h source -c $HOME/.config/local/rc.zsh