Commit | Line | Data |
---|---|---|
855ca243 AB |
1 | # Bash-like navigation |
2 | #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' | |
56fe4497 AB |
3 | #export WORDCHARS='*?-[]~=&;!#$%^(){}<>' |
4 | export WORDCHARS='*?[]~=&;!#$%^(){}<>' | |
149b29f1 | 5 | #ZLE_SPACE_SUFFIX_CHARS=$'|&' |
855ca243 | 6 | |
af0337b0 AB |
7 | #disable -r time # disable shell reserved word |
8 | #alias time='time -p' # -p for POSIX output | |
8b2a2e9c | 9 | |
855ca243 AB |
10 | # rehash if last command was pacaur or pacman |
11 | # (so that zsh picks up changes in $PATH immediately) | |
12 | TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh } | |
13 | ||
855ca243 AB |
14 | # |
15 | # User configuration sourced by interactive shells | |
16 | # | |
17 | ||
56fe4497 AB |
18 | # Change default zim location |
19 | export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim | |
855ca243 | 20 | |
56fe4497 AB |
21 | # Start zim |
22 | [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh | |
855ca243 AB |
23 | |
24 | ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red') | |
25 | #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold' | |
26 | ||
56fe4497 AB |
27 | setopt globdots |
28 | ||
855ca243 | 29 | source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh |
161c93e9 | 30 | source ~/.zsh/zsh-autopair/autopair.zsh |
d0ef45b9 | 31 | |
56fe4497 AB |
32 | |
33 | ### fzf ### | |
34 | ||
35 | source /usr/share/fzf/key-bindings.zsh | |
36 | source /usr/share/fzf/completion.zsh | |
37 | ||
38 | # Accept history selection instead of putting it on | |
39 | # the command line | |
40 | fzf-history-widget-accept() { | |
41 | fzf-history-widget | |
42 | zle accept-line | |
43 | } | |
44 | #zle -N fzf-history-widget-accept | |
45 | #bindkey '^R' fzf-history-widget-accept | |
46 | ||
47 | # alt+c preview | |
48 | export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'" | |
49 | ||
50 | ### fzf ### | |
51 | ||
52 | ||
d0ef45b9 AB |
53 | # aliases |
54 | alias mpv="mpv --ytdl-format mp4" | |
55 | alias mv="mv -iv" | |
56 | alias cp="cp -iv" | |
378dacde AB |
57 | alias scl=systemctl |
58 | alias jcl=journalctl | |
8b2a2e9c | 59 | alias m="mbsync -Va; getmail; notmuch new" |
161c93e9 | 60 | alias best="youtube-dl -f best" |
149b29f1 | 61 | alias ace="mosh amin@ace.aminb.org" |
61777d7d | 62 | alias nix="ssh amin@aminb.org" |
61777d7d | 63 | |
61777d7d AB |
64 | aur() { |
65 | cd ~/usr/build | |
66 | git clone https://aur.archlinux.org/${1}.git | |
67 | cd ${1} | |
68 | } | |
56fe4497 AB |
69 | |
70 | # i-beam cursor | |
71 | echo -e "\033[5 q" | |
72 | #echo -e "\033[6 q" |