Last active
April 28, 2023 21:20
-
-
Save joshschmelzle/1ff77c4f7c8281041aa742b4b318a123 to your computer and use it in GitHub Desktop.
Mac Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a file on your mac called setup.sh | |
# run it from terminal with: sh setup.sh | |
# heavily inspired by https://twitter.com/damcclean | |
# https://github.com/damcclean/dotfiles/blob/master/install.sh | |
# inspired by https://gist.github.com/chris-sev/45a92f4356eaf4d68519d396ef42dd99 | |
# faster dock hiding/showing (run in terminal) | |
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock | |
# add dock spacer | |
# defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' && killall Dock | |
#!/bin/bash | |
set -euo pipefail | |
# Display message 'Setting up your Mac...' | |
echo "Setting up your Mac..." | |
sudo -v | |
# Homebrew - Installation | |
echo "Installing Homebrew" | |
if test ! $(which brew); then | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
fi | |
# Install Homebrew Packages | |
cd ~ | |
echo "Installing Homebrew packages" | |
homebrew_packages=( | |
"git" | |
"wget" | |
"jq" | |
"ffmpeg" | |
"docker" | |
"hashcat" | |
"hcxtools" | |
"tcpdump" | |
"sipcalc" | |
"vim" | |
"tmux" | |
"figlet" | |
"gcc" | |
"iperf3" | |
"ncurses" | |
"lua" | |
"python@3.11" | |
"sqlite" | |
"stats" | |
"perl" | |
"php" | |
) | |
for homebrew_package in "${homebrew_packages[@]}"; do | |
brew install "$homebrew_package" | |
done | |
# Install Casks | |
echo "Installing Homebrew cask packages" | |
homebrew_cask_packages=( | |
"alt-tab" | |
"discord" | |
"github" | |
"keycastr" | |
"screenflow" | |
"setapp" | |
"spotify" | |
"visual-studio-code" | |
) | |
# extra apps to install | |
# quitter - https://marco.org/apps#quitter | |
# synergy | |
# greenshot | |
# contrast | |
# secure crt | |
# o365 | |
# obsidian | |
# bitwarden | |
# slack | |
# signal | |
# chrome | |
# edge | |
# virtualbox | |
# obs | |
# transmit | |
# caffine | |
# goodnotes 5 | |
# balenaEtcher | |
# zerotier | |
# texshop | |
# daisydisk | |
# audacity | |
# gimp | |
# onedrive | |
# apps in mac store | |
# airtool2 | |
# transfer | |
# wifi explorer pro 3 | |
# apps in setapp (check your setapps favorites list) | |
# bartender | |
for homebrew_cask_package in "${homebrew_cask_packages[@]}"; do | |
brew install --cask "$homebrew_cask_package" | |
done | |
# configure git | |
git config --global user.name "Josh Schmelzle" | |
git config --global user.email "josh@joshschmelzle.com" | |
gh config set git_protocol "ssh" | |
# Create projects directory called The Waiting Room | |
echo "Creating a The Waiting Room directory" | |
mkdir -p $HOME/documents/thewaitingroom | |
# oh-my-zsh | |
echo "Adding Oh my zsh" | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
git clone https://github.com/agkozak/zsh-z $ZSH_CUSTOM/plugins/zsh-z | |
# zsh configuration | |
touch ~/.my-zshrc | |
# aliases | |
echo "alias ni='npm i'" >> ~/.my-zshrc | |
# zsh plugins | |
echo "plugins=(git zsh-completions zsh-z)" >> ~/.my-zshrc | |
echo "source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.my-zshrc | |
echo "source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.my-zshrc | |
# add our zshrc config to the main zshrc config | |
echo ". ~/.my-zshrc" >> "$HOME/.zshrc" | |
# Generate SSH key | |
echo "Generating SSH keys" | |
ssh-keygen -t rsa | |
echo "Copied SSH key to clipboard - You can now add it to Github" | |
pbcopy < ~/.ssh/id_rsa.pub | |
# Complete | |
echo "Installation Complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment