diff --git a/install_zsh.sh b/install_zsh.sh index bab884c..d12ec7f 100644 --- a/install_zsh.sh +++ b/install_zsh.sh @@ -13,7 +13,7 @@ if [ ! command -v git &> /dev/null ]; then fi # Asking if user really want to install -read -p 'This script will replace ~/.zshrc with its own. If you still want to run it, type "y": ' -n 1 -r +read -p 'This script will replace ~/.zshrc with its own and place old to ~/.zshrc.old if it exists. Type y to run it: ' -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then exit 1 @@ -25,8 +25,11 @@ if ! test -f ~/.oh-my-zsh/oh-my-zsh.sh; then showcom eval "git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh --depth 1 > /dev/null 2>&1" showcom eval "rm -rf ~/.oh-my-zsh/.git" fi +if test -f ~/.zshrc; then + showcom eval "cp ~/.zshrc ~/.zshrc.old" +fi; +showcom eval "wget -O ~/.zshrc https://nakidai.ddns.net/nakidai/dotfiles/raw/branch/master/zsh/.zshrc > /dev/null 2>&1" showcom eval "git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting --depth 1 > /dev/null 2>&1" showcom eval "rm -rf ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/.git" -showcom eval "wget -O ~/.zshrc https://nakidai.ddns.net/nakidai/dotfiles/raw/branch/master/zsh/.zshrc > /dev/null 2>&1" -showcom eval "wget -O ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/headline.zsh-theme https://nakidai.ddns.net/nakidai/dotfiles/raw/branch/master/zsh/headline.zsh-theme > /dev/null 2>&1" +showcom eval "wget -O ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/headline_nakidai.zsh-theme https://nakidai.ddns.net/nakidai/dotfiles/raw/branch/master/zsh/headline_nakidai.zsh-theme > /dev/null 2>&1" echo "Done" diff --git a/zsh/.zshrc b/zsh/.zshrc index 746288b..d8aaa7f 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,6 +1,6 @@ export ZSH="$HOME/.oh-my-zsh" export EDITOR=nvim -ZSH_THEME="headline" +ZSH_THEME="headline_nakidai" plugins=(git zsh-syntax-highlighting) source $ZSH/oh-my-zsh.sh diff --git a/zsh/headline.zsh-theme b/zsh/headline_nakidai.zsh-theme similarity index 100% rename from zsh/headline.zsh-theme rename to zsh/headline_nakidai.zsh-theme