diff options
author | yushyin <yushyin@saga> | 2015-09-06 23:38:44 +0200 |
---|---|---|
committer | yushyin <yushyin@saga> | 2015-09-06 23:38:44 +0200 |
commit | 16dcd0d806b222875f2f7cff090d3d2d70fabf25 (patch) | |
tree | 916b32b66cfd3ad255bc100a12e0a645f1880600 /zsh | |
parent | e24311868d818b18d93b51bcf4ff5e1adb556261 (diff) | |
download | dotfiles-16dcd0d806b222875f2f7cff090d3d2d70fabf25.tar.gz dotfiles-16dcd0d806b222875f2f7cff090d3d2d70fabf25.tar.xz |
Add zsh config
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/.zprofile | 1 | ||||
-rw-r--r-- | zsh/.zshenv | 1 | ||||
-rw-r--r-- | zsh/.zshrc | 85 | ||||
-rw-r--r-- | zsh/exportlist | 10 |
4 files changed, 97 insertions, 0 deletions
diff --git a/zsh/.zprofile b/zsh/.zprofile new file mode 100644 index 0000000..068aad8 --- /dev/null +++ b/zsh/.zprofile @@ -0,0 +1 @@ +[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && . $ZDOTDIR/exportlist && exec startx diff --git a/zsh/.zshenv b/zsh/.zshenv new file mode 100644 index 0000000..278092c --- /dev/null +++ b/zsh/.zshenv @@ -0,0 +1 @@ +ZDOTDIR=$HOME/.config/zsh/ diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..07a93a2 --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,85 @@ +# Input/Output +setopt interactive_comments + +# Expansion and Globbing +setopt extended_glob nomatch + +# Job Control +unsetopt notify + +# History +setopt append_history hist_ignore_dups hist_ignore_space +HISTFILE=~/.cache/zsh/histfile +HISTSIZE=1000 +SAVEHIST=100000 + +# Zle +setopt beep +autoload -z edit-command-line +zle -N edit-command-line + +# Keybinds +bindkey -e +bindkey \^U backward-kill-line +bindkey \^X\^E edit-command-line + +# Changing Directories +setopt auto_cd auto_pushd +DIRSTACKSIZE=30 + +# Completion +setopt always_to_end list_ambiguous +zstyle ':completion:*' menu select +zstyle ':completion:*' use-perl on +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path $HOME/.cache/zsh/complcache +zstyle ':completion:*:*:kill:*' command 'ps --forest -u$USER -o pid,%cpu,tty,cputime,cmd' +zstyle :compinstall filename "$HOME/.config/zsh/.zshrc" +autoload -Uz compinit +compinit -d $HOME/.cache/zsh/zcompdump + +# Misc +PATH=~/.local/bin:$PATH +REPORTTIME=2 +PROMPT=": " +RPROMPT="%1~" + +# Fasd +(( $+commands[fasd] )) && { + fasd_initcache=$HOME/.cache/zsh/fasd_init + if [[ $(command -v fasd) -nt $fasd_cache || ! -s $fasd_cache ]]; then + fasd --init \ + posix-alias \ + zsh-hook \ + zsh-ccomp \ + zsh-ccomp-install \ + zsh-wcomp \ + zsh-wcomp-install \ + >| $fasd_initcache + fi + . $fasd_initcache + unset $fasd_initcache + + alias v='fasd -f -t -e vim -b viminfo' + alias m='fasd -f -e mpv' + alias o='fasd -a -e xdg-open' + + _FASD_DATA=$HOME/.local/share/fasd + _FASD_VIMINFO=$HOME/.cache/vim/viminfo + export _FASD_DATA _FASD_VIMINFO +} + +# Aliases +alias _='sudo' +alias g='git' +alias hc='herbstclient' +alias l='ls -l' +alias ll='ls -la' +alias p='pacman' +alias sc='systemctl' +alias t='task' +alias aria2c="aria2c --conf-path=$HOME/.config/aria2/config" +alias chat="ssh karif -t 'TERM=\"xterm\" /usr/bin/bash -l -c \"tmux attach -t weechat\"'" +alias ncmpcpp='ncmpcpp --config ~/.config/ncmpcpp/config' +alias rbt="sudo kexec -l /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --reuse-cmdline && sudo systemctl kexec" +alias tmux='tmux -f ~/.config/tmux/tmux.conf' diff --git a/zsh/exportlist b/zsh/exportlist new file mode 100644 index 0000000..f7b8461 --- /dev/null +++ b/zsh/exportlist @@ -0,0 +1,10 @@ +EDITOR=vim +GIMP2_DIRECTORY=~/.local/share/gimp +MPV_HOME=~/.config/mpv +MPD_HOST=idun +TASKRC=~/.config/task/taskrc +VIMINIT='let $MYVIMRC="~/.config/vim/vimrc" | source $MYVIMRC' +TEXMFHOME=~/.local/share/texlive +TEXMFCONFIG=~/.config/texlive +TEXMFVAR=~/.cache/texlive +export MPV_HOME MPD_HOST VIMINIT EDITOR TASKRC GIMP2_DIRECTORY TEXMFHOME TEXMFCONFIG TEXMFVAR |