Skip to content

Instantly share code, notes, and snippets.

@jrishabh55
Last active August 21, 2022 16:39
Show Gist options
  • Save jrishabh55/1e1bab49bc031ddbb3be9dbb2b27e6a3 to your computer and use it in GitHub Desktop.
Save jrishabh55/1e1bab49bc031ddbb3be9dbb2b27e6a3 to your computer and use it in GitHub Desktop.
Macbook Setup
#!/usr/bin/env zsh
# Setup script for setting up a new macos machine
EMAIL="hello@rishabhjain.dev"
NAME="Rishabh Jain"
echo "Starting setup"
ssh-keygen -t ed25519 -C $EMAIL
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
PACKAGES=(
git
tmux
readline
planetscale/tap/pscale
mysql-client
)
CASKS=(
alfred
iterm2
warp
slack
vscodium
firefox
google-chrome
notion
font-hack-nerd-font
font-jetbrains-mono
)
# install xcode CLI
xcode-select —-install
# Check for Homebrew to be present, install if it's missing
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
brew update
echo "Installing packages..."
brew install --appdir="/Applications" ${PACKAGES[@]}
echo "Cleaning up..."
brew cleanup
git config --global user.name $NAME
git config --global user.email $EMAIL
echo "Installing cask..."
echo "Installing cask apps..."
brew install --cask ${CASKS[@]}
# Installing oh-my-zsh
curl -L http://install.ohmyz.sh | sh
# Installing NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.zshrc
# Install powerline10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Install zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# Install zsh-completions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
# Install zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# Installing Node
nvm install node
echo "Macbook setup completed!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment