Commit aa203e431a3b4d8ce3fa7732a5a441680839bf30
1 parent
b6a161bbf8
Exists in
master
and in
2 other branches
TEST
Showing 2 changed files with 7 additions and 6 deletions Inline Diff
templates/zshrc.sh
| 1 | #@IgnoreInspection AddShebang | 1 | #@IgnoreInspection AddShebang |
| 2 | # ENVIRONMENT: | 2 | # ENVIRONMENT: |
| 3 | export GJ_DEVENV=local_aptproxy | 3 | export GJ_DEVENV=local_aptproxy |
| 4 | 4 | ||
| 5 | export ZCFG=~/.config/zsh-config | 5 | export ZCFG=~/.config/zsh-config |
| 6 | # Path to your oh-my-zsh installation. | 6 | # Path to your oh-my-zsh installation. |
| 7 | export ZSH=$ZCFG/packages/oh-my-zsh | 7 | export ZSH=$ZCFG/packages/oh-my-zsh |
| 8 | 8 | ||
| 9 | export LANG=en_US.UTF-8 | 9 | export LANG=en_US.UTF-8 |
| 10 | 10 | ||
| 11 | # Compilation flags | 11 | # Compilation flags |
| 12 | export ARCHFLAGS="-arch x86_64" | 12 | export ARCHFLAGS="-arch x86_64" |
| 13 | 13 | ||
| 14 | # Themes are in (...)/oh-my-zsh/themes/ or "random" | 14 | # Themes are in (...)/oh-my-zsh/themes/ or "random" |
| 15 | ZSH_THEME="muse" | 15 | ZSH_THEME="muse" |
| 16 | 16 | ||
| 17 | CASE_SENSITIVE="true" | 17 | CASE_SENSITIVE="true" |
| 18 | DISABLE_AUTO_UPDATE="true" | 18 | DISABLE_AUTO_UPDATE="true" |
| 19 | DISABLE_AUTO_TITLE="true" | 19 | DISABLE_AUTO_TITLE="true" |
| 20 | ENABLE_CORRECTION="true" | 20 | ENABLE_CORRECTION="true" |
| 21 | COMPLETION_WAITING_DOTS="true" | 21 | COMPLETION_WAITING_DOTS="true" |
| 22 | DISABLE_UNTRACKED_FILES_DIRTY="true" | 22 | DISABLE_UNTRACKED_FILES_DIRTY="true" |
| 23 | HIST_STAMPS="dd.mm.yyyy" | 23 | HIST_STAMPS="dd.mm.yyyy" |
| 24 | ZSH_CUSTOM=ZCFG/custom | 24 | ZSH_CUSTOM=ZCFG/custom |
| 25 | 25 | ||
| 26 | plugins=(command-not-found common-aliases debian dirhistory git history history-substring-search systemadmin zsh_reload | 26 | plugins=(command-not-found common-aliases debian dirhistory git history history-substring-search systemadmin zsh_reload |
| 27 | pip python virtualenv virtualenvwrapper | 27 | pip python virtualenv virtualenvwrapper |
| 28 | meteor node npm | 28 | meteor node npm |
| 29 | ) | 29 | ) |
| 30 | 30 | ||
| 31 | if [ -f ~/.config/zsh-config/templates/bash_aliases ]; then | 31 | #if [ -f ~/.config/zsh-config/templates/bash_aliases ]; then |
| 32 | . ~/.config/zsh-config/templates/bash_aliases | 32 | # . ~/.config/zsh-config/templates/bash_aliases |
| 33 | fi | 33 | #fi |
| 34 | 34 | ||
| 35 | # User configuration | 35 | # User configuration |
| 36 | export PATH=$HOME/bin:/usr/local/bin:$PATH | 36 | export PATH=$HOME/bin:/usr/local/bin:$PATH |
| 37 | # export MANPATH="/usr/local/man:$MANPATH" | 37 | # export MANPATH="/usr/local/man:$MANPATH" |
| 38 | 38 | ||
| 39 | source ~/.zshrc | 39 | source ~/.zshrc |
| 40 | 40 | ||
| 41 | # source $ZSH/oh-my-zsh.sh | 41 | # source $ZSH/oh-my-zsh.sh |
| 42 | 42 | ||
| 43 | # ANTIGEN: | 43 | # ANTIGEN: |
| 44 | # | 44 | # |
| 45 | # source $ZCFG/packages/antigen/antigen.zsh | 45 | # source $ZCFG/packages/antigen/antigen.zsh |
| 46 | # | 46 | # |
| 47 | # MUST: | 47 | # MUST: |
| 48 | #antigen bundle extract | 48 | #antigen bundle extract |
| 49 | # | 49 | # |
| 50 | # | 50 | # |
| 51 | # NICE: | 51 | # NICE: |
| 52 | #antigen bundle iwhois | 52 | #antigen bundle iwhois |
| 53 | #antigen bundle screen | 53 | #antigen bundle screen |
| 54 | #antigen bundle ssh-agent | 54 | #antigen bundle ssh-agent |
| 55 | #antigen bundle web-search | 55 | #antigen bundle web-search |
| 56 | # # if webdev: | 56 | # # if webdev: |
| 57 | #antigen bundle catimg | 57 | #antigen bundle catimg |
| 58 | # | 58 | # |
| 59 | # docker: | 59 | # docker: |
| 60 | #antigen bundle docker | 60 | #antigen bundle docker |
| 61 | # | 61 | # |
| 62 | # kde: | 62 | # kde: |
| 63 | #antigen bundle kate | 63 | #antigen bundle kate |
| 64 | # | 64 | # |
| 65 | # removed: | 65 | # removed: |
| 66 | #antigen bundle autoenv | 66 | #antigen bundle autoenv |
| 67 | #antigen bundle iwhois | 67 | #antigen bundle iwhois |
| 68 | #antigen bundle per-directory-history | 68 | #antigen bundle per-directory-history |
| 69 | #antigen bundle screen | 69 | #antigen bundle screen |
| 70 | # | 70 | # |
| 71 | # THEME #---------- | 71 | # THEME #---------- |
| 72 | # | 72 | # |
| 73 | #antigen theme muse | 73 | #antigen theme muse |
| 74 | # | 74 | # |
| 75 | #antigen apply | 75 | #antigen apply |
| 76 | 76 | ||
| 77 | # ssh | 77 | # ssh |
| 78 | # export SSH_KEY_PATH="~/.ssh/id_rsa" | 78 | # export SSH_KEY_PATH="~/.ssh/id_rsa" |
| 79 | # zstyle :omz:plugins:ssh-agent agent-forwarding on | 79 | # zstyle :omz:plugins:ssh-agent agent-forwarding on |
| 80 | 80 | ||
| 81 | # Preferred editor for local and remote sessions | 81 | # Preferred editor for local and remote sessions |
| 82 | # if [[ -n $SSH_CONNECTION ]]; then | 82 | # if [[ -n $SSH_CONNECTION ]]; then |
| 83 | # export EDITOR='vim' | 83 | # export EDITOR='vim' |
| 84 | # else | 84 | # else |
| 85 | # export EDITOR='mvim' | 85 | # export EDITOR='mvim' |
| 86 | # fi | 86 | # fi |
tools/install.sh
| 1 | #@IgnoreInspection AddShebang | 1 | #@IgnoreInspection AddShebang |
| 2 | # | 2 | # |
| 3 | # ** Initiate with: ** | 3 | # ** Initiate with: ** |
| 4 | # cd && curl -L http://git.str8.biz/mj/zsh-config/raw/master/tools/install.sh | sh | 4 | # cd && curl -L http://git.str8.biz/mj/zsh-config/raw/master/tools/install.sh | sh |
| 5 | # | 5 | # |
| 6 | # --------------------------------------------------------------------------------------------- | 6 | # --------------------------------------------------------------------------------------------- |
| 7 | # | 7 | # |
| 8 | # gj@ubuntu4docker:~$ touch install.sh | 8 | # gj@ubuntu4docker:~$ touch install.sh |
| 9 | # gj@ubuntu4docker:~$ rm install.sh && nano install.sh && chmod +x install.sh && ./install.sh | 9 | # gj@ubuntu4docker:~$ rm install.sh && nano install.sh && chmod +x install.sh && ./install.sh |
| 10 | # | 10 | # |
| 11 | ################################################################################################ | 11 | ################################################################################################ |
| 12 | 12 | ||
| 13 | set -e | 13 | set -e |
| 14 | 14 | ||
| 15 | if [ "$SHELL" != "$(which zsh)" ]; then | 15 | if [ "$SHELL" != "$(which zsh)" ]; then |
| 16 | echo "$(which zsh)" | 16 | echo "$(which zsh)" |
| 17 | sudo echo "enter pass...." | 17 | sudo echo "enter pass...." |
| 18 | 18 | ||
| 19 | echo "ok" | 19 | echo "ok" |
| 20 | 20 | ||
| 21 | sudo apt-get -yq install curl dialog git nano zsh | 21 | sudo apt-get -yq install curl dialog git nano zsh |
| 22 | #sudo apt-get -yq python-setuptools | 22 | #sudo apt-get -yq python-setuptools |
| 23 | 23 | ||
| 24 | #sudo easy_install pip | 24 | #sudo easy_install pip |
| 25 | #sudo pip install virtualenvwrapper | 25 | #sudo pip install virtualenvwrapper |
| 26 | fi | 26 | fi |
| 27 | 27 | ||
| 28 | if [ 1 == 2 ]; then | 28 | if [ 1 == 2 ]; then |
| 29 | mkvirtualenv cb-meteor | 29 | mkvirtualenv cb-meteor |
| 30 | pip install nodeenv | 30 | pip install nodeenv |
| 31 | nodeenv -p | 31 | nodeenv -p |
| 32 | # curl https://install.meteor.com/ | sh | 32 | # curl https://install.meteor.com/ | sh |
| 33 | fi | 33 | fi |
| 34 | 34 | ||
| 35 | if [ ! -n "$ZCNF" ]; then | 35 | if [ ! -n "$ZCNF" ]; then |
| 36 | ZCNF=~/.config/zsh-config | 36 | ZCNF=~/.config/zsh-config |
| 37 | fi | 37 | fi |
| 38 | 38 | ||
| 39 | if [ ! -n "$ZSH" ]; then | 39 | if [ ! -n "$ZSH" ]; then |
| 40 | ZSH=$ZCNF/packages/oh-my-zsh | 40 | ZSH=$ZCNF/packages/oh-my-zsh |
| 41 | fi | 41 | fi |
| 42 | 42 | ||
| 43 | echo "\033[0;34mCleaning...\033[0m" | 43 | echo "\033[0;34mCleaning...\033[0m" |
| 44 | if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then | 44 | if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then |
| 45 | if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then | 45 | if [ -d ~/.config/zsh-config ] || [ -h ~/.config/zsh-config ]; then |
| 46 | rm -rf ~/.config/zsh-config | 46 | rm -rf ~/.config/zsh-config |
| 47 | fi | 47 | fi |
| 48 | # if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then | 48 | # if [ -d ~/.config/oh-my-zsh ] || [ -h ~/.config/oh-my-zsh ]; then |
| 49 | # rm -rf ~/.config/oh-my-zsh | 49 | # rm -rf ~/.config/oh-my-zsh |
| 50 | # fi | 50 | # fi |
| 51 | if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then | 51 | if [ -d ~/.config/antigen ] || [ -h ~/.config/antigen ]; then |
| 52 | rm -rf ~/.config/antigen | 52 | rm -rf ~/.config/antigen |
| 53 | fi | 53 | fi |
| 54 | fi | 54 | fi |
| 55 | 55 | ||
| 56 | if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then | 56 | if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then |
| 57 | mv ~/.zshrc ~/.zshrc.pre-zsh-cnf | 57 | mv ~/.zshrc ~/.zshrc.pre-zsh-cnf |
| 58 | fi | 58 | fi |
| 59 | # | 59 | # |
| 60 | # BASH: | 60 | # BASH: |
| 61 | # | 61 | # |
| 62 | if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then | 62 | if [ -f ~/.bashrc ] || [ -h ~/.bashrc ]; then |
| 63 | mv ~/.bashrc ~/.bashrc.pre-zsh-cnf | 63 | mv ~/.bashrc ~/.bashrc.pre-zsh-cnf |
| 64 | fi | 64 | fi |
| 65 | if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then | 65 | if [ -f ~/.bash_aliases ] || [ -h ~/.bash_aliases ]; then |
| 66 | rm ~/.bash_aliases | 66 | rm ~/.bash_aliases |
| 67 | fi | 67 | fi |
| 68 | 68 | ||
| 69 | echo "\033[0;34mCloning Zsh Config...\033[0m" | 69 | echo "\033[0;34mCloning Zsh Config...\033[0m" |
| 70 | hash git >/dev/null 2>&1 && env git clone --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || { | 70 | hash git >/dev/null 2>&1 && env git clone --depth=1 http://git.str8.biz/mj/zsh-config.git $ZCNF || { |
| 71 | echo "can't clone repo.." | 71 | echo "can't clone repo.." |
| 72 | exit 1 | 72 | exit 1 |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" | 75 | echo "\033[0;34mUsing the Zsh Config template file and adding it to ~/.zshrc\033[0m" |
| 76 | cp $ZCNF/templates/zshrc.sh ~/.zshrc | 76 | cp $ZCNF/templates/zshrc.sh ~/.zshrc |
| 77 | cp $ZCNF/templates/bashrc.sh ~/.bashrc | 77 | cp $ZCNF/templates/bashrc.sh ~/.bashrc |
| 78 | # ln -s $ZCNF/templates/bash_aliases.sh ~/.bash_aliases | 78 | # ln -s $ZCNF/templates/bash_aliases.sh ~/.bash_aliases |
| 79 | sed -i -e "/^export ZSH=/ c\\ | 79 | sed -i -e "/^export ZSH=/ c\\ |
| 80 | export ZSH=$ZSH | 80 | export ZSH=$ZSH |
| 81 | " ~/.zshrc | 81 | " ~/.zshrc |
| 82 | 82 | ||
| 83 | echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" | 83 | echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" |
| 84 | sed -i -e "/export PATH=/ c\\ | 84 | sed -i -e "/export PATH=/ c\\ |
| 85 | export PATH=\"$PATH\" | 85 | export PATH=\"$PATH\" |
| 86 | " ~/.zshrc | 86 | " ~/.zshrc |
| 87 | 87 | ||
| 88 | if [ "$SHELL" != "$(which zsh)" ]; then | 88 | if [ "$SHELL" != "$(which zsh)" ]; then |
| 89 | echo "\033[0;34mTime to change your default shell to zsh!\033[0m" | 89 | echo "\033[0;34mTime to change your default shell to zsh!\033[0m" |
| 90 | echo "chsh -s $(which zsh)" | 90 | # echo "chsh -s $(which zsh)" |
| 91 | chsh -s /bin/zsh | ||
| 91 | fi | 92 | fi |
| 92 | 93 | ||
| 93 | echo "\033[0;32m"' __ __ '"\033[0m" | 94 | echo "\033[0;32m"' __ __ '"\033[0m" |
| 94 | echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" | 95 | echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" |
| 95 | echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" | 96 | echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" |
| 96 | echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" | 97 | echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" |
| 97 | echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" | 98 | echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" |
| 98 | echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" | 99 | echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" |
| 99 | echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" | 100 | echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" |
| 100 | echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" | 101 | echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" |
| 101 | echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m" | 102 | echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m" |
| 102 | #env zsh | 103 | env zsh |
| 103 | #. ~/.zshrc | 104 | . ~/.zshrc |
| 104 | 105 |