add msmtp, update isync & notmuch dots to handle my uwaterloo email
[~bandali/configs] / zsh / .zshrc
... / ...
CommitLineData
1# Bash-like navigation
2#export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
3#export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
4export WORDCHARS='*?[]~=&;!#$%^(){}<>'
5
6#disable -r time # disable shell reserved word
7#alias time='time -p' # -p for POSIX output
8
9# rehash if last command was pacaur or pacman
10# (so that zsh picks up changes in $PATH immediately)
11TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
12
13#
14# User configuration sourced by interactive shells
15#
16
17# Change default zim location
18export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
19
20# Start zim
21[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
22
23ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
24#ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
25
26setopt globdots
27
28source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
29source ~/.zsh/zsh-autopair/autopair.zsh
30
31
32### fzf ###
33
34source /usr/share/fzf/key-bindings.zsh
35source /usr/share/fzf/completion.zsh
36
37# Accept history selection instead of putting it on
38# the command line
39fzf-history-widget-accept() {
40 fzf-history-widget
41 zle accept-line
42}
43#zle -N fzf-history-widget-accept
44#bindkey '^R' fzf-history-widget-accept
45
46# alt+c preview
47export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
48
49### fzf ###
50
51
52# aliases
53alias mpv="mpv --ytdl-format mp4"
54alias mv="mv -iv"
55alias cp="cp -iv"
56alias scl=systemctl
57alias jcl=journalctl
58alias m="mbsync -Va; getmail; notmuch new"
59alias best="youtube-dl -f best"
60
61# i-beam cursor
62echo -e "\033[5 q"
63#echo -e "\033[6 q"