Skip to content

Instantly share code, notes, and snippets.

@mabbouxj
Last active November 23, 2022 14:57
Show Gist options
  • Save mabbouxj/2bdbedf4debcbd6a6cd0c53d334315c3 to your computer and use it in GitHub Desktop.
Save mabbouxj/2bdbedf4debcbd6a6cd0c53d334315c3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Install ZSH and Oh-my-ZSH
if [ ! -d "$HOME/.oh-my-zsh" ]; then
if [[ `uname` == "Darwin" ]]; then
brew update
brew install zsh
else
sudo apt update
sudo apt install zsh
fi
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
# Plugin zsh-autosuggestions
if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
fi
# .vimrc
if [ -f "$HOME/.vimrc" ]; then
mv ~/.vimrc ~/.old.vimrc
echo "~/.vimrc backed up to ~/.old.vimrc"
fi
curl -fsSL https://gist.githubusercontent.com/mabbouxj/eb83155478bbaff9e41073edc42b76b2/raw/.vimrc > ~/.vimrc
# .zshrc
if [ -f "$HOME/.zshrc" ]; then
mv ~/.zshrc ~/.old.zshrc
echo "~/.zshrc backed up to ~/.old.zshrc"
fi
curl -fsSL https://gist.githubusercontent.com/mabbouxj/91f6156ebeb788c59a49399c6f298dad/raw/.zshrc > ~/.zshrc
# gnzh-custom.zsh-theme
if [ -f "$HOME/.oh-my-zsh/custom/themes/gnzh-custom.zsh-theme" ]; then
mv ~/.oh-my-zsh/custom/themes/gnzh-custom.zsh-theme ~/.oh-my-zsh/custom/themes/.old.gnzh-custom.zsh-theme
echo "~/.oh-my-zsh/custom/themes/gnzh-custom.zsh-theme backed up to ~/.oh-my-zsh/custom/themes/.old.gnzh-custom.zsh-theme"
fi
curl -fsSL https://gist.githubusercontent.com/mabbouxj/5a10c00c9415613774da628d0629f442/raw/gnzh-custom.zsh-theme > ~/.oh-my-zsh/custom/themes/gnzh-custom.zsh-theme
@mabbouxj
Copy link
Author

still so useful, thank you! ❤️

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment