Skip to content

Instantly share code, notes, and snippets.

@kenichi-shibata
Last active October 16, 2020 05:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenichi-shibata/bf425d40f7b6aaad3fdac9cd7c545602 to your computer and use it in GitHub Desktop.
Save kenichi-shibata/bf425d40f7b6aaad3fdac9cd7c545602 to your computer and use it in GitHub Desktop.
plugins=(
git
bundler
dotenv
osx
rake
rbenv
ruby
kubectl
pipenv
zsh-autosuggestions
)
# you need to install oh-my-zsh
ZSH_CUSTOM=~/.oh-my-zsh
autoload -U promptinit; promptinit; compinit
# you need to have powerlevel9k on your oh-my-zsh dir (hhz)
# git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
ZSH_THEME="powerlevel9k/powerlevel9k"
# you need to install nerd fonts via
# brew tap homebrew/cask-fonts
# brew cask install font-hack-nerd-font
POWERLEVEL9K_MODE='nerdfont-complete'
# Customise the Powerlevel9k prompts
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs dir_writable newline)
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(kubecontext time vi_mode command_execution_time status ram battery virtualenv)
# maybe add battery too right or left?
POWERLEVEL9K_KUBECONTEXT_BACKGROUND='004'
POWERLEVEL9K_KUBECONTEXT_FOREGROUND='000'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0
POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=4
POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND='021'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND='004'
POWERLEVEL9K_STATUS_CROSS=true
# Load Zsh tools for syntax highlighting and autosuggestions
# git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions
# git clone git://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
source $HOME/.oh-my-zsh/oh-my-zsh.sh
source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.bash_aliases
source ~/.oh-my-zsh/custom/themes/powerlevel9k/powerlevel9k.zsh-theme
source ~/.z.sh
source <(kubectl completion zsh)
source <(helm completion zsh)
# more plugins?
#https://github.com/bhilburn/powerlevel9k
### Source asdf the versionmanager
source $HOME/.asdf/asdf.sh
# Run the latest installation of go gimme GIMME
source ~/.gimme/envs/latest.env || echo "All is well "
# add github creds automagically
source ~/.github
# Kubeee
source ~/.bash_kube
# Python binaries
PYTHON_ASDF="$(asdf where python)"
PYTHON_BIN="$PYTHON_ASDF/bin"
export PYTHON_BIN
### PATH
export PATH=$PYTHON_BIN:~/.kube/kubectl:$GOPATH/bin:$PATH
# Add autocomplete funcs in ~/.zsh/completion
# dump something like eksctl autocomplete there
# mkdir -p ~/.zsh/completion/
# eksctl completion zsh > ~/.zsh/completion/_eksctl
# https://eksctl.io/introduction/
fpath=($fpath ~/.zsh/completion)
# Reload the zsh-completions
autoload -U compinit && compinit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment