Commit | Line | Data |
---|---|---|
855ca243 AB |
1 | # Bash-like navigation |
2 | #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' | |
56fe4497 AB |
3 | #export WORDCHARS='*?-[]~=&;!#$%^(){}<>' |
4 | export WORDCHARS='*?[]~=&;!#$%^(){}<>' | |
855ca243 | 5 | |
af0337b0 AB |
6 | #disable -r time # disable shell reserved word |
7 | #alias time='time -p' # -p for POSIX output | |
8b2a2e9c | 8 | |
855ca243 AB |
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 | ||
855ca243 AB |
13 | # |
14 | # User configuration sourced by interactive shells | |
15 | # | |
16 | ||
56fe4497 AB |
17 | # Change default zim location |
18 | export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim | |
855ca243 | 19 | |
56fe4497 AB |
20 | # Start zim |
21 | [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh | |
855ca243 AB |
22 | |
23 | ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red') | |
24 | #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold' | |
25 | ||
56fe4497 AB |
26 | setopt globdots |
27 | ||
855ca243 | 28 | source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh |
161c93e9 | 29 | source ~/.zsh/zsh-autopair/autopair.zsh |
d0ef45b9 | 30 | |
56fe4497 AB |
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 | ||
d0ef45b9 AB |
52 | # aliases |
53 | alias mpv="mpv --ytdl-format mp4" | |
54 | alias mv="mv -iv" | |
55 | alias cp="cp -iv" | |
378dacde AB |
56 | alias scl=systemctl |
57 | alias jcl=journalctl | |
8b2a2e9c | 58 | alias m="mbsync -Va; getmail; notmuch new" |
161c93e9 | 59 | alias best="youtube-dl -f best" |
a40a6293 | 60 | alias ace="ssh amin@ace.aminb.org" |
61777d7d AB |
61 | alias nix="ssh amin@aminb.org" |
62 | alias mutt=neomutt | |
63 | ||
64 | alias p=pacaur | |
65 | alias psyu="pacaur -Syu" | |
66 | alias pS="pacaur -S" | |
67 | alias t=trizen | |
68 | aur() { | |
69 | cd ~/usr/build | |
70 | git clone https://aur.archlinux.org/${1}.git | |
71 | cd ${1} | |
72 | } | |
56fe4497 AB |
73 | |
74 | # i-beam cursor | |
75 | echo -e "\033[5 q" | |
76 | #echo -e "\033[6 q" |