|
@@ -0,0 +1,200 @@
|
|
|
|
+source /usr/share/zsh/share/antigen.zsh
|
|
|
|
+
|
|
|
|
+antigen use oh-my-zsh
|
|
|
|
+antigen theme agnoster
|
|
|
|
+
|
|
|
|
+antigen bundle colored-man-pages
|
|
|
|
+antigen bundle docker
|
|
|
|
+antigen bundle git
|
|
|
|
+#antigen bundle tmux
|
|
|
|
+antigen bundle virtualenv
|
|
|
|
+#antigen bundle virtualenvwrapper
|
|
|
|
+
|
|
|
|
+antigen bundle ael-code/zsh-gpg-agent
|
|
|
|
+antigen bundle ael-code/zsh-plugin-fasd-fzf
|
|
|
|
+antigen bundle gangleri/pipenv
|
|
|
|
+antigen bundle leophys/zsh-plugin-fzf-finder
|
|
|
|
+#antigen bundle junegunn/fzf
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+antigen apply
|
|
|
|
+
|
|
|
|
+# User configuration
|
|
|
|
+
|
|
|
|
+# LS_COLORS
|
|
|
|
+
|
|
|
|
+# eval `dircolors /home/leo/Documents/coding/dircolors-solarized/dircolors.ansi-dark`
|
|
|
|
+
|
|
|
|
+# FASD
|
|
|
|
+
|
|
|
|
+eval "$(fasd --init auto)"
|
|
|
|
+
|
|
|
|
+# eval "$(pipenv --completion)"
|
|
|
|
+#compdef pipenv
|
|
|
|
+_pipenv() {
|
|
|
|
+ eval $(env COMMANDLINE="${words[1,$CURRENT]}" _PIPENV_COMPLETE=complete-zsh pipenv)
|
|
|
|
+}
|
|
|
|
+if [[ "$(basename ${(%):-%x})" != "_pipenv" ]]; then
|
|
|
|
+ autoload -U compinit && compinit
|
|
|
|
+ compdef _pipenv pipenv
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## Set SSH to use gpg-agent
|
|
|
|
+unset SSH_AGENT_PID
|
|
|
|
+if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
|
|
|
+ export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+## Node and NVM
|
|
|
|
+export NVM_DIR=/home/leo/.nvm
|
|
|
|
+function nvm {
|
|
|
|
+ if [ -s "$NVM_DIR/nvm.sh" ]; then
|
|
|
|
+ . "$NVM_DIR/nvm.sh"
|
|
|
|
+ nvm use system
|
|
|
|
+ nvm $@
|
|
|
|
+ fi
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+## Ruby and RVM
|
|
|
|
+[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
|
|
|
|
+export PATH=/home/leo/.gem/ruby/2.5.0/bin:$PATH
|
|
|
|
+source /home/leo/.rvm/scripts/rvm
|
|
|
|
+export rvmsudo_secure_path=1
|
|
|
|
+
|
|
|
|
+## Taken from old .zshrc
|
|
|
|
+
|
|
|
|
+dl () {
|
|
|
|
+ emulate -L zsh
|
|
|
|
+ autoload -U colors
|
|
|
|
+ local color=$fg_bold[blue]
|
|
|
|
+ integer i=0
|
|
|
|
+ dirs -p | while read dir
|
|
|
|
+ do
|
|
|
|
+ local num="${$(printf "%-4d " $i)/ /.}"
|
|
|
|
+ printf " %s $color%s$reset_color\n" $num $dir
|
|
|
|
+ (( i++ ))
|
|
|
|
+ done
|
|
|
|
+ integer dir=-1
|
|
|
|
+ read -r 'dir?Jump to directory: ' || return
|
|
|
|
+ (( dir == -1 )) && return
|
|
|
|
+ if (( dir < 0 || dir >= i ))
|
|
|
|
+ then
|
|
|
|
+ echo d: no such directory stack entry: $dir
|
|
|
|
+ return 1
|
|
|
|
+ fi
|
|
|
|
+ cd ~$dir
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+# pcat
|
|
|
|
+alias pcat='pygmentize -f terminal256 -O style=native -g'
|
|
|
|
+
|
|
|
|
+# Fuckin' TERM env for ssh
|
|
|
|
+function ssh {
|
|
|
|
+ if [[ "${TERM}" = tmux* ]]; then
|
|
|
|
+ env TERM=xterm /bin/ssh "$@"
|
|
|
|
+ else
|
|
|
|
+ /bin/ssh "$@"
|
|
|
|
+ fi
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## Misc
|
|
|
|
+export MANPATH="/usr/local/man:$MANPATH"
|
|
|
|
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
|
|
|
+export EDITOR=vim
|
|
|
|
+
|
|
|
|
+# You may need to manually set your language environment
|
|
|
|
+# export LANG=en_US.UTF-8
|
|
|
|
+
|
|
|
|
+# Preferred editor for local and remote sessions
|
|
|
|
+# if [[ -n $SSH_CONNECTION ]]; then
|
|
|
|
+# export EDITOR='vim'
|
|
|
|
+# else
|
|
|
|
+# export EDITOR='mvim'
|
|
|
|
+# fi
|
|
|
|
+
|
|
|
|
+# Compilation flags
|
|
|
|
+# export ARCHFLAGS="-arch x86_64"
|
|
|
|
+
|
|
|
|
+# ssh
|
|
|
|
+# export SSH_KEY_PATH="~/.ssh/rsa_id"
|
|
|
|
+
|
|
|
|
+# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
|
|
|
+# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
|
|
|
+# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
|
|
|
+# For a full list of active aliases, run `alias`.
|
|
|
|
+#
|
|
|
|
+# Example aliases
|
|
|
|
+# alias zshconfig="mate ~/.zshrc"
|
|
|
|
+# alias ohmyzsh="mate ~/.oh-my-zsh"
|
|
|
|
+
|
|
|
|
+## Flutter
|
|
|
|
+export PATH=$PATH:/opt/flutter/bin/
|
|
|
|
+
|
|
|
|
+## Go
|
|
|
|
+export GOPATH=~/.go
|
|
|
|
+export PATH=$PATH:$GOPATH/bin
|
|
|
|
+
|
|
|
|
+## Aliases
|
|
|
|
+alias t="tmux -2"
|
|
|
|
+alias sy="systemctl"
|
|
|
|
+alias ssy="sudo systemctl"
|
|
|
|
+alias sl="cmatrix -b -s"
|
|
|
|
+alias cd..="cmatrix -b -s -C yellow"
|
|
|
|
+alias lt="ls -lt"
|
|
|
|
+alias lh="ls -lh"
|
|
|
|
+alias la="ls -la"
|
|
|
|
+alias ll="ls -l"
|
|
|
|
+alias lrt="ls -lrt"
|
|
|
|
+
|
|
|
|
+ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
|
|
|
|
+if [[ ! -d $ZSH_CACHE_DIR ]]; then
|
|
|
|
+ mkdir $ZSH_CACHE_DIR
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+source $ZSH/oh-my-zsh.sh
|
|
|
|
+# Setup fzf
|
|
|
|
+# ---------
|
|
|
|
+if [[ ! "$PATH" == */home/leo/Documents/coding/fzf/bin* ]]; then
|
|
|
|
+ export PATH="$PATH:/home/leo/Documents/coding/fzf/bin"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+# Auto-completion
|
|
|
|
+# ---------------
|
|
|
|
+[[ $- == *i* ]] && source "/home/leo/Documents/coding/fzf/shell/completion.zsh" 2> /dev/null
|
|
|
|
+
|
|
|
|
+# Key bindings
|
|
|
|
+# ------------
|
|
|
|
+source "/home/leo/Documents/coding/fzf/shell/key-bindings.zsh"
|
|
|
|
+
|
|
|
|
+# Tig
|
|
|
|
+# ---
|
|
|
|
+
|
|
|
|
+if [ -f /usr/share/bash-completion/completions/tig ]; then
|
|
|
|
+ source /usr/share/bash-completion/completions/tig
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+# virtualenvwrapper
|
|
|
|
+# -----------------
|
|
|
|
+
|
|
|
|
+if [ -f /usr/bin/virtualenvwrapper_lazy.sh ]; then
|
|
|
|
+ source /usr/bin/virtualenvwrapper_lazy.sh
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+# geoiplookup
|
|
|
|
+# -----------
|
|
|
|
+
|
|
|
|
+alias geocityiplookup="geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat"
|
|
|
|
+
|
|
|
|
+# mailbundle
|
|
|
|
+# ----------
|
|
|
|
+
|
|
|
|
+alias mutt="neomutt"
|
|
|
|
+
|
|
|
|
+# antigen apply
|
|
|
|
+
|
|
|
|
+antigen apply
|
|
|
|
+
|
|
|
|
+# vim: et sw=2 ts=2
|