Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Somesa/f5fd56375402bb78d48d5724d9ee73d9 to your computer and use it in GitHub Desktop.
Save Somesa/f5fd56375402bb78d48d5724d9ee73d9 to your computer and use it in GitHub Desktop.
Custom @ohmyzsh installation which keeps ~/.zshrc in sync via @dropbox
# Create hidden folder for Oh My Zsh core installation with subfolders for custom plugins and themes
mkdir -p ~/.zsh/custom/{plugins,themes}
# Clone Oh My Zsh from Github into root of hidden ~/.zsh directory
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.zsh/oh-my-zsh
# Clone Powerlevel9k theme to ~/.zsh/custom/themes folder
git clone https://github.com/bhilburn/powerlevel9k.git ~/.zsh/custom/themes/powerlevel9k
# Fetch and install Nerd Font from Github to be used with our new shell config (http://nerdfonts.com/#downloads), long script but does the job :)
cd ~/Downloads && { curl -LOk https://github.com/ryanoasis/nerd-fonts/releases/download/v1.1.0/SourceCodePro.zip ; unzip SourceCodePro.zip -d SourceCodePro ; cd ./SourceCodePro ; open Source\ Code\ Pro\ Nerd\ Font\ Complete.ttf ; }
# Clone zsh-autosuggestions to ~/.zsh/custom/plugins folder
git clone git://github.com/zsh-users/zsh-autosuggestions ~/.zsh/custom/plugins/zsh-autosuggestions
# Clone zsh-completions to ~/.zsh/custom/plugins folder
git clone git://github.com/zsh-users/zsh-completions.git ~/.zsh/custom/plugins/zsh-completions
# Create a new zsh configuration file from template
cp ~/.zsh/oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
# Backup just created ~/.zshrc file (just in case we want to revert back to default config)
cp ~/.zshrc ~/.zshrc.orig
# Keep .zshrc config sync'd between computers with Dropbox
# If your Dropbox folder is not in the default location, you'll need to change ~/Dropbox to your location
# Add a new directory for Oh My Zsh inside ~/Dropbox folder
mkdir -p ~/Dropbox/oh-my-zsh
# Move existing file to ~/Dropbox/oh-my-zsh/ folder we created in previous step
mv ~/.zshrc ~/Dropbox/oh-my-zsh/zshrc
# Symlink file back to your local directory
ln -s ~/Dropbox/oh-my-zsh/zshrc ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment