compton: make it more stable
[~bandali/configs] / zsh / .zshrc
1 # Bash-like navigation
2 #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
3 #export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
4 export 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)
11 TRAPUSR1() { 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
18 export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
19
20 # Start zim
21 [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
22
23 ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
24 #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
25
26 setopt globdots
27
28 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
29 source ~/.zsh/zsh-autopair/autopair.zsh
30
31
32 ### fzf ###
33
34 source /usr/share/fzf/key-bindings.zsh
35 source /usr/share/fzf/completion.zsh
36
37 # Accept history selection instead of putting it on
38 # the command line
39 fzf-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
47 export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
48
49 ### fzf ###
50
51
52 # aliases
53 alias mpv="mpv --ytdl-format mp4"
54 alias mv="mv -iv"
55 alias cp="cp -iv"
56 alias scl=systemctl
57 alias jcl=journalctl
58 alias m="mbsync -Va; getmail; notmuch new"
59 alias best="youtube-dl -f best"
60
61 # i-beam cursor
62 echo -e "\033[5 q"
63 #echo -e "\033[6 q"