zsh/.zshrc (view raw)
1# __
2# ____ _____/ /_ __________
3# /_ / / ___/ __ \/ ___/ ___/
4# _ / /_(__ ) / / / / / /__
5#(_)___/____/_/ /_/_/ \___/
6#
7
8# export thingys
9export ZSH=/home/icyphox/.oh-my-zsh
10export BROWSER=/usr/bin/firefox-nightly
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
18
19# theme specefic
20ZSH_THEME="spaceship"
21export SPACESHIP_CHAR_SYMBOL="> "
22export SPACESHIP_USER_SHOW=always
23export SPACESHIP_HOST_SHOW=always
24
25# plugins
26plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
27
28source $ZSH/oh-my-zsh.sh
29source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
30
31# aliases
32alias icysite="cd ~/leet/icysite"
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 vim="nvim"
39alias vi="nvim"
40alias sxiv="sxiv -b"
41
42# end and home keys
43bindkey "^[[1~" beginning-of-line
44bindkey "^[[4~" end-of-line
45
46[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
47
48# gnome-keyring thing
49if [ -n "$DESKTOP_SESSION" ];then
50 eval $(gnome-keyring-daemon --start)
51 export SSH_AUTH_SOCK
52fi
53
54#export NVM_DIR="$HOME/.nvm"
55#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
56#[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
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