Last active
October 4, 2019 06:59
-
-
Save jw910731/77d0899090cab3714e2162476e08b98a to your computer and use it in GitHub Desktop.
Zsh Setting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| robbyrussell/oh-my-zsh | |
| robbyrussell/oh-my-zsh path:plugins/git | |
| robbyrussell/oh-my-zsh path:plugins/pip | |
| robbyrussell/oh-my-zsh path:plugins/bower | |
| robbyrussell/oh-my-zsh path:plugins/node | |
| robbyrussell/oh-my-zsh path:plugins/xcode | |
| robbyrussell/oh-my-zsh path:plugins/osx | |
| robbyrussell/oh-my-zsh path:plugins/colored-man-pages | |
| robbyrussell/oh-my-zsh path:plugins/copyfile | |
| robbyrussell/oh-my-zsh path:plugins/python | |
| robbyrussell/oh-my-zsh path:plugins/copydir | |
| robbyrussell/oh-my-zsh path:plugins/docker | |
| robbyrussell/oh-my-zsh path:plugins/virtualenv | |
| robbyrussell/oh-my-zsh path:plugins/iterm2 | |
| robbyrussell/oh-my-zsh path:plugins/sublime | |
| robbyrussell/oh-my-zsh path:plugins/urltools | |
| #robbyrussell/oh-my-zsh path:plugins/vargrant | |
| robbyrussell/oh-my-zsh path:plugins/sudo | |
| romkatv/powerlevel10k | |
| zsh-users/zsh-completions | |
| zsh-users/zsh-autosuggestions | |
| zsh-users/zsh-syntax-highlighting | |
| zsh-users/zsh-history-substring-search ./zsh-history-substring-search.zsh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ZSH INIT SCRIPT # | |
| # Lines configured by zsh-newuser-install | |
| HISTFILE=~/.histfile | |
| HISTSIZE=1000 | |
| SAVEHIST=1000 | |
| bindkey -e | |
| # End of lines configured by zsh-newuser-install | |
| # The following lines were added by compinstall | |
| zstyle :compinstall filename '/Users/jw910731/.zshrc' | |
| autoload -Uz compinit | |
| compinit | |
| # End of lines added by compinstall | |
| # Path Setting | |
| # Path Setting | |
| export GOPATH=$HOME/Develope/go | |
| export GOBIN=$GOPATH/bin | |
| export JAVA_HOME=`/usr/libexec/java_home -v 1.8` | |
| export PATH=/usr/local/bin:$GOBIN:$PATH | |
| # HELPER FUNCTION | |
| is_ssh(){ | |
| if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then | |
| echo "true" | |
| return | |
| # many other tests omitted | |
| else | |
| case $(ps -o comm= -p $PPID) in | |
| sshd|*/sshd) echo "true";; | |
| esac | |
| fi | |
| } | |
| # ZSH PACKAGE INJECT SCRIPT # | |
| # Mac iTerm Integration | |
| if [[ $(uname) == "Darwin" ]]; then | |
| if [[ -f ~/.iterm2_shell_integration.zsh ]]; then | |
| source ~/.iterm2_shell_integration.zsh | |
| else | |
| echo "iTerm integration may be available but not correctly setup." | |
| fi | |
| fi | |
| # Setting Antibody | |
| source <(antibody init) | |
| ZSH="$(antibody home)/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh" | |
| if [[ ! -f ~/.zsh_plugin ]]; then | |
| echo "~/.zsh_plugin not exist!!" | |
| fi | |
| antibody bundle < ~/.zsh_plugin | |
| # Power Level 9k(10k actually) Setting | |
| # Theme | |
| POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context vcs newline status dir dir_writable) | |
| POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(background_jobs time) | |
| # Customization | |
| POWERLEVEL9K_PROMPT_ADD_NEWLINE=true | |
| POWERLEVEL9K_CONTEXT_TEMPLATE="%n`if [[ $(is_ssh) == "true" ]]; then echo -n @;hostname -f;fi`" #" | |
| #context | |
| POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND='white' | |
| POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND='deepskyblue3' | |
| POWERLEVEL9K_CONTEXT_SUDO_BACKGROUND='208' | |
| POWERLEVEL9K_CONTEXT_SUDO_FOREGROUND='black' | |
| POWERLEVEL9K_CONTEXT_REMOTE_SUDO_BACKGROUND=$POWERLEVEL9K_CONTEXT_SUDO_BACKGROUND | |
| POWERLEVEL9K_CONTEXT_REMOTE_SUDO_FOREGROUND=$POWERLEVEL9K_CONTEXT_SUDO_FOREGROUND | |
| POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=$POWERLEVEL9K_CONTEXT_SUDO_BACKGROUND | |
| POWERLEVEL9K_CONTEXT_ROOT_SUDO_FOREGROUND=$POWERLEVEL9K_CONTEXT_SUDO_FOREGROUND | |
| #Dir | |
| POWERLEVEL9K_DIR_DEFAULT_BACKGROUND='006' | |
| POWERLEVEL9K_DIR_DEFAULT_FOREGROUND='grey89' | |
| POWERLEVEL9K_DIR_HOME_BACKGROUND=$POWERLEVEL9K_DIR_DEFAULT_BACKGROUND | |
| POWERLEVEL9K_DIR_HOME_FOREGROUND=$POWERLEVEL9K_DIR_DEFAULT_FOREGROUND | |
| POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND=$POWERLEVEL9K_DIR_DEFAULT_BACKGROUND | |
| POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND=$POWERLEVEL9K_DIR_DEFAULT_FOREGROUND | |
| POWERLEVEL9K_DIR_ETC_BACKGROUND=$POWERLEVEL9K_DIR_DEFAULT_BACKGROUND | |
| POWERLEVEL9K_DIR_ETC_FOREGROUND=$POWERLEVEL9K_DIR_DEFAULT_FOREGROUND | |
| #time & status | |
| POWERLEVEL9K_TIME_FOREGROUND='white' | |
| POWERLEVEL9K_TIME_BACKGROUND=none | |
| POWERLEVEL9K_STATUS_BACKGROUND=none | |
| # Export zsh locale setting | |
| export LANG=zh_TW.UTF-8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment