Skip to content

Instantly share code, notes, and snippets.

@wahlstedtw
Last active July 31, 2023 13:48
Show Gist options
  • Save wahlstedtw/336b9b6a50cdba92ad73cd5f8efcb4f2 to your computer and use it in GitHub Desktop.
Save wahlstedtw/336b9b6a50cdba92ad73cd5f8efcb4f2 to your computer and use it in GitHub Desktop.
Setup MacOS Script
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
NC='\033[0m' # No Color
# Run this with [click the raw button and paste below]:
# curl https://gist.github.com/wahlstedtw/336b9b6a50cdba92ad73cd5f8efcb4f2 -o mac_setup.sh && chmod u+x mac_setup.sh && ./mac_setup.sh
printf "${GREEN}---------------------------------------\n"
printf "${GREEN}-- ${RED}Setting up your Mac. Please Hold! ${GREEN}--\n"
printf "${GREEN}---------------------------------------\n"
printf "${GREEN}--------------------------\n"
printf "${GREEN}Install homebrew\n"
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
printf "${GREEN}Logged in as ${loggedInUser}\n"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$loggedInUser/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
printf "${GREEN}--------------------------\n"
printf "${GREEN}Installing base packages\n"
brew install -q visual-studio-code
brew install -q firefox
brew install -q spotify
brew install -q iterm2
brew install -q slack
brew install -q brave-browser
brew install -q zsh
brew install -q curl
brew install -q wget
brew install -q git
#brew install -q balenaetcher
#brew install -q raspberry-pi-imager
brew install -q derailed/k9s/k9s
brew install -q --cask openlens
printf "${GREEN}--------------------------\n"
printf "${GREEN}Install Oh My Zsh\n"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
printf "${GREEN}--------------------------\n"
printf "${GREEN}Install powerlevel10k via brew\n"
brew install romkatv/powerlevel10k/powerlevel10k
echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc
echo ""
printf "${ORANGE}It should have prompted you to configure the theme but if it didn't run: p10k configure\n"
echo ""
read -p "Press any key to resume ..."
printf "${GREEN}--------------------------\n"
printf "${GREEN}Configure iTerm2 with Natural Text Editing\n"
printf "${ORANGE} https://stackoverflow.com/a/53626025/4929231\n"
echo ""
printf "${GREEN}--------------------------\n"
printf "${GREEN}All Done! Enjoy Your Mac!\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment