Skip to content

Instantly share code, notes, and snippets.

@onimenotsuki
Created August 1, 2019 19:42
Show Gist options
  • Save onimenotsuki/e531bbdad2167a5b32c0fda286551cd4 to your computer and use it in GitHub Desktop.
Save onimenotsuki/e531bbdad2167a5b32c0fda286551cd4 to your computer and use it in GitHub Desktop.
My new configuration
source ~/antigen/antigen.zsh
# Update antigen
antigen update
# Load the oh-my-zsh library
antigen use oh-my-zsh
# Bundles from the default repo
antigen bundle git
antigen bundle archlinux
antigen bundle tmux
antigen bundle colored-man-pages
antigen bundle heroku
antigen bundle lein
antigen bundle command-not-found
antigen bundle autojump
antigen bundle pip
antigen bundle git-extras
antigen bundle git-flow
antigen bundle npm
antigen bundle ruby
antigen bundle rvm
antigen bundle nvm
antigen bundle pyenv
antigen bundle yarn
antigen bundle Tarrasch/zsh-autoenv
antigen bundle Tarrasch/zsh-colors
antigen bundle jocelynmallon/zshmarks
antigen bundle sei40kr/zsh-tmux-rename
antigen bundle hlissner/zsh-autopair
# Syntax highlighting bundle
antigen bundle zsh-users/zsh-syntax-highlighting
# An opinionated git prompt for bash and zsh
# antigen bundle arialdomartini/oh-my-git
# antigen theme caiogondim/bullet-train-oh-my-zsh-theme bullet-train
# antigen theme https://gist.github.com/3750104.git agnoster
# antigen theme https://github.com/marszall87/nodeys-zsh-theme nodeys
# antigen theme bhilburn/powerlevel9k powerlevel9k
# antigen theme tylerreckart/odin odin
# antigen theme fino
# antigen theme sorin
# antigen theme steeef
# antigen theme https://github.com/denysdovhan/spaceship-prompt spaceship
# antigen theme dannynimmo/punctual-zsh-theme punctual
# antigen theme NelsonBrandao/absolute absolute
# antigen theme Jmclerck/webicons webicons
antigen bundle mafredri/zsh-async
antigen bundle marszall87/lambda-pure
# Tell antigen that you're done
antigen apply
### Prompt for spaceship theme
SPACESHIP_ROOT=$PWD
SPACESHIP_NODE_SYMBOL="⬢ "
SPACESHIP_RUBY_SYMBOL="⬢ "
SPACESHIP_RUBY_SHOW=false
# SPACESHIP_PACKAGE_SYMBOL=""
SPACESHIP_PYENV_SYMBOL="⬢ "
### Prompt for powerlevel9k
POWERLEVEL9K_MODE="awesome-patched"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(rvm node_version)
POWERLEVEL9K_RVM_BACKGROUND="red"
POWERLEVEL9K_NODE_ICON=""
POWERLEVEL9K_NODE_VERSION_FOREGROUND="black"
POWERLEVEL9K_SHORTEN_DELIMITER=".."
POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%{%F{249}%}\u250f"
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="%{%F{249}%}\u2517%{%F{default}%} "
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
# POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
### Prompt for bullet-train
# TIME
BULLETTRAIN_TIME_SHOW=false
# NVM
BULLETTRAIN_NVM_SHOW=true
BULLETTRAIN_NVM_FG=black
BULLETTRAIN_NVM_BG=cyan
BULLETTRAIN_NVM_PREFIX=""
# DIR
BULLETTRAIN_DIR_EXTENDED=0
# RUBY
BULLETTRAIN_RUBY_BG=red
BULLETTRAIN_RUBY_PREFIX=""
# GIT
BULLETTRAIN_GIT_BG=white
BULLETTRAIN_GIT_FG=black
# Force tmux to assume that the terminal support 256 colors
alias tmux="tmux -2"
# Some alias for https://github.com/jocelynmallon/zshmarks plugin
alias j="jump"
alias sm="showmarks"
alias bm="bookmark"
# places this after nvm initialization
# Loads .nvmrc file automatically whenever you enter a directory that contains an .nvmrc file
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
# script to get local ip
export LOCAL_IP="$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/edgar/google-cloud-sdk/path.zsh.inc' ]; then source '/home/edgar/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/edgar/google-cloud-sdk/completion.zsh.inc' ]; then source '/home/edgar/google-cloud-sdk/completion.zsh.inc'; fi
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
source ~/antigen/antigen.zsh
# Update antigen
antigen update
# Load the oh-my-zsh library
antigen use oh-my-zsh
# Bundles from the default repo
antigen bundle git
antigen bundle archlinux
antigen bundle tmux
antigen bundle colored-man-pages
antigen bundle heroku
antigen bundle lein
antigen bundle command-not-found
antigen bundle autojump
antigen bundle pip
antigen bundle git-extras
antigen bundle git-flow
antigen bundle npm
antigen bundle ruby
antigen bundle rvm
antigen bundle nvm
antigen bundle pyenv
antigen bundle yarn
antigen bundle Tarrasch/zsh-autoenv
antigen bundle Tarrasch/zsh-colors
antigen bundle jocelynmallon/zshmarks
antigen bundle sei40kr/zsh-tmux-rename
antigen bundle hlissner/zsh-autopair
# Syntax highlighting bundle
antigen bundle zsh-users/zsh-syntax-highlighting
# An opinionated git prompt for bash and zsh
# antigen bundle arialdomartini/oh-my-git
# antigen theme caiogondim/bullet-train-oh-my-zsh-theme bullet-train
# antigen theme https://gist.github.com/3750104.git agnoster
# antigen theme https://github.com/marszall87/nodeys-zsh-theme nodeys
# antigen theme bhilburn/powerlevel9k powerlevel9k
# antigen theme tylerreckart/odin odin
# antigen theme fino
# antigen theme sorin
# antigen theme steeef
# antigen theme https://github.com/denysdovhan/spaceship-prompt spaceship
# antigen theme dannynimmo/punctual-zsh-theme punctual
# antigen theme NelsonBrandao/absolute absolute
# antigen theme Jmclerck/webicons webicons
antigen bundle mafredri/zsh-async
antigen bundle marszall87/lambda-pure
# Tell antigen that you're done
antigen apply
### Prompt for spaceship theme
SPACESHIP_ROOT=$PWD
SPACESHIP_NODE_SYMBOL="⬢ "
SPACESHIP_RUBY_SYMBOL="⬢ "
SPACESHIP_RUBY_SHOW=false
# SPACESHIP_PACKAGE_SYMBOL=""
SPACESHIP_PYENV_SYMBOL="⬢ "
### Prompt for powerlevel9k
POWERLEVEL9K_MODE="awesome-patched"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(rvm node_version)
POWERLEVEL9K_RVM_BACKGROUND="red"
POWERLEVEL9K_NODE_ICON=""
POWERLEVEL9K_NODE_VERSION_FOREGROUND="black"
POWERLEVEL9K_SHORTEN_DELIMITER=".."
POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%{%F{249}%}\u250f"
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="%{%F{249}%}\u2517%{%F{default}%} "
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
# POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
### Prompt for bullet-train
# TIME
BULLETTRAIN_TIME_SHOW=false
# NVM
BULLETTRAIN_NVM_SHOW=true
BULLETTRAIN_NVM_FG=black
BULLETTRAIN_NVM_BG=cyan
BULLETTRAIN_NVM_PREFIX=""
# DIR
BULLETTRAIN_DIR_EXTENDED=0
# RUBY
BULLETTRAIN_RUBY_BG=red
BULLETTRAIN_RUBY_PREFIX=""
# GIT
BULLETTRAIN_GIT_BG=white
BULLETTRAIN_GIT_FG=black
# Force tmux to assume that the terminal support 256 colors
alias tmux="tmux -2"
# Some alias for https://github.com/jocelynmallon/zshmarks plugin
alias j="jump"
alias sm="showmarks"
alias bm="bookmark"
# places this after nvm initialization
# Loads .nvmrc file automatically whenever you enter a directory that contains an .nvmrc file
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
# script to get local ip
export LOCAL_IP="$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/edgar/google-cloud-sdk/path.zsh.inc' ]; then source '/home/edgar/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/edgar/google-cloud-sdk/completion.zsh.inc' ]; then source '/home/edgar/google-cloud-sdk/completion.zsh.inc'; fi
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment