zsh/.zshrc (view raw)
1# __
2# ____ _____/ /_ __________
3# /_ / / ___/ __ \/ ___/ ___/
4# _ / /_(__ ) / / / / / /__
5#(_)___/____/_/ /_/_/ \___/
6#
7
8# export thingys
9export ZSH=/home/$USER/.oh-my-zsh
10export BROWSER=/usr/bin/firefox
11export EDITOR=/usr/bin/nvim
12export SSH_KEY_PATH="~/.ssh/id_rsa"
13export PATH=$PATH:$GOROOT/bin
14export PATH=$PATH:$HOME/bin
15export GPG_TTY=$(tty)
16export INPUTRC=~/.inputrc
17export PATH=$PATH:$HOME/Leet/Nim/bin
18export PATH=$PATH:$HOME/go/bin
19export PATH=$PATH:$HOME/.nimble/bin
20
21# theme specefic
22ZSH_THEME="icy"
23COMPLETION_WAITING_DOTS="true"
24
25# plugins
26plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
27
28# sourced scripts
29source $ZSH/oh-my-zsh.sh
30source /usr/share/autojump/autojump.zsh
31
32# aliases
33alias scrot="~/bin/scrot.sh"
34alias icyinfo="~/bin/icyinfo.sh"
35alias gah='sudo $(fc -ln -1)'
36alias nvime='nvim ~/.config/nvim/init.vim'
37alias up="~/bin/icyup.sh"
38alias x="~/bin/oxo.nim"
39alias envac="source .env/bin/activate"
40alias vim="nvim"
41alias vi="nvim"
42alias sxiv="sxiv -b"
43alias ls="exa"
44alias la="exa -al"
45alias socks="ssh -D 8008 boop"
46alias vpn="sudo openvpn --config client.ovpn --script-security 2"
47alias o="xdg-open"
48alias cat="bat"
49alias gc="git commit -v -s"
50
51# end and home keys
52bindkey "^[[1~" beginning-of-line
53bindkey "^[[4~" end-of-line
54
55[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
56
57# Defer initialization of nvm until nvm, node or a node-dependent command is
58# run. Ensure this block is only run once if .bashrc gets sourced multiple times
59# by checking whether __init_nvm is a function.
60if [ -s "$HOME/.nvm/nvm.sh" ] && [ ! "$(type __init_nvm)" = function ]; then
61 export NVM_DIR="$HOME/.nvm"
62 [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"
63 declare -a __node_commands=('nvm' 'node' 'npm' 'yarn' 'gulp' 'grunt' 'webpack')
64 function __init_nvm() {
65 for i in "${__node_commands[@]}"; do unalias $i; done
66 . "$NVM_DIR"/nvm.sh
67 unset __node_commands
68 unset -f __init_nvm
69 }
70 for i in "${__node_commands[@]}"; do alias $i='__init_nvm && '$i; done
71fi
72
73# base16-shell
74BASE16_SHELL="$HOME/.config/base16-shell/"
75[ -n "$PS1" ] && \
76 [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
77 eval "$("$BASE16_SHELL/profile_helper.sh")"