gtk3: update settings (via kde-gtk-config); zsh: add ace alias
[~bandali/configs] / zsh / .zshrc
CommitLineData
855ca243
AB
1# Bash-like navigation
2#export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
56fe4497
AB
3#export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
4export 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)
11TRAPUSR1() { 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
18export 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
23ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
24#ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
25
56fe4497
AB
26setopt globdots
27
855ca243 28source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
161c93e9 29source ~/.zsh/zsh-autopair/autopair.zsh
d0ef45b9 30
56fe4497
AB
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
d0ef45b9
AB
52# aliases
53alias mpv="mpv --ytdl-format mp4"
54alias mv="mv -iv"
55alias cp="cp -iv"
378dacde
AB
56alias scl=systemctl
57alias jcl=journalctl
8b2a2e9c 58alias m="mbsync -Va; getmail; notmuch new"
161c93e9 59alias best="youtube-dl -f best"
a40a6293 60alias ace="ssh amin@ace.aminb.org"
61777d7d
AB
61alias nix="ssh amin@aminb.org"
62alias mutt=neomutt
63
64alias p=pacaur
65alias psyu="pacaur -Syu"
66alias pS="pacaur -S"
67alias t=trizen
68aur() {
69 cd ~/usr/build
70 git clone https://aur.archlinux.org/${1}.git
71 cd ${1}
72}
56fe4497
AB
73
74# i-beam cursor
75echo -e "\033[5 q"
76#echo -e "\033[6 q"