Skip to content

Instantly share code, notes, and snippets.

@jaakkolehtonen
Last active March 19, 2021 00:22
Show Gist options
  • Save jaakkolehtonen/cf33bb02be414f781cf653d1250d8374 to your computer and use it in GitHub Desktop.
Save jaakkolehtonen/cf33bb02be414f781cf653d1250d8374 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
@Somesa
Copy link

Somesa commented Oct 20, 2020

thx ;)

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