X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/d760033f89f7284473895b207e1e36b2f934e8b8..304bcc2c50980ee3d75df0b320c4dfc41277288e:/zsh/.zshrc?ds=inline diff --git a/zsh/.zshrc b/zsh/.zshrc index ec92298..5ca4c1b 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,23 +1,37 @@ -# Base16 Shell -#BASE16_SCHEME="thewildhunt" -#BASE16_SHELL="$HOME/.theme/base16-$BASE16_SCHEME.dark.sh" -#[[ -s $BASE16_SHELL ]] && . $BASE16_SHELL +# Bash-like navigation +#export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' +export WORDCHARS='*?-[]~=&;!#$%^(){}<>' -PATH="$HOME/.local/bin:$PATH" -#PATH="`ruby -e 'print Gem.user_dir'`/bin:$PATH" -PATH="/opt/android-sdk/platform-tools:$PATH" -#source ~/.profile +fpath+=~/.zfunc -# take -function take() { - mkdir -p $1 - cd $1 -} +disable -r time # disable shell reserved word +alias time='time -p' # -p for POSIX output -function y() { - cd ~/music - youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 $1 -} +# rehash if last command was pacaur or pacman +# (so that zsh picks up changes in $PATH immediately) +TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh } -#eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh) ; export GPG_AGENT_INFO SSH_AUTH_SOCK + +# +# User configuration sourced by interactive shells +# + +# Source zim +if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then + source ${ZDOTDIR:-${HOME}}/.zim/init.zsh +fi + + +ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red') +#ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold' + +source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh + +# aliases +alias mpv="mpv --ytdl-format mp4" +alias mv="mv -iv" +alias cp="cp -iv" +alias scl=systemctl +alias jcl=journalctl +alias m="mbsync -Va; getmail; notmuch new"