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