Skip to content

Instantly share code, notes, and snippets.

@jsteenb2
Last active September 13, 2019 00:19
Show Gist options
  • Save jsteenb2/90bfb3add46c767dd0b0815744486d6f to your computer and use it in GitHub Desktop.
Save jsteenb2/90bfb3add46c767dd0b0815744486d6f to your computer and use it in GitHub Desktop.
new mac setup
#!/bin/bash
# Fix up the key repeat issues on MacOS Sierra. Need the key repeats for VIM!
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Finder should show all .files
defaults write com.apple.finder AppleShowAllFiles YES
# Disable default Mac behaviour to reopen everything on startup from previous shut down.
defaults write -g ApplePersistence -bool FALSE;
defaults write com.apple.dock show-recents -bool FALSE;
# Auto-hide the dock.
defaults write com.apple.dock autohide -float 1
defaults write com.apple.dock autohide-time-modifier -float 1;
# Only show active programs in the dock. Nothing else.
defaults write com.apple.dock static-only -bool TRUE;
# default finder to list view
defaults write com.apple.Finder FXPreferredViewStyle Nlsv
# Reset Dock
killall Dock
if xcode-select --install
then echo "installed xcode select"
else echo "was not able to install xcode-select"
fi
# install brew
$(which ruby) -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install brew dependencies
brew install git npm yarn htop ctop vim
# install cask dependencies
brew cask install appcleaner
brew cask install docker
brew cask install firefox
brew cask install iterm2
brew cask install macdown
brew cask install postman
brew cask install slack
brew cask install spectacle
brew cask install spotify
# Install zsh
brew install zsh zsh-completions
chmod go-w '/usr/local/share'
chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# install .zshrc file
curl https://gist.githubusercontent.com/jsteenb2/12ed40de96bdc9311915a9b13794a94e/raw/43ec03d476c4e8df83b3c0a35b263105ac766b6e/.zshrc > ~/.zshrc
# Install zsh plugins
brew install getantibody/tap/antibody
echo 'zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
zsh-users/zsh-docker
zsh-users/zsh-apple-touchbar
caarlos0/zsh-open-github-pr kind:path
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search
' >> ~/.zsh_plugins.txt
antibody bundle < ~/.zsh_plugins.txt > ~/.zsh_plugins.sh
# Install powerline fonts
git clone https://github.com/powerline/fonts.git --depth=1
./fonts/install.sh
rm -rf fonts
# shell aliases
curl https://gist.githubusercontent.com/jsteenb2/59e04f749c40c43c9ba0707c80c1e565/raw/193772c7dbf6fa2201568b3a7f56be101e5d5c65/.aliases.sh > ~/.aliases.sh
echo 'source ~/.aliases.sh' >> .zshrc
# update zsh
upgrade_oh_my_zsh
# git aliases
curl https://gist.githubusercontent.com/jsteenb2/8f6f3f220e0b23d6c52b250c40766c71/raw/64ff75895a67e97412b24532e5d11fc5830ca389/.gitconfig > ~/.gitconfig
echo "\n\nFinished! 🎉 Now log out and log back in for changes to take effect."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment