Created
November 13, 2019 18:58
-
-
Save olmedocr/a7b13eb174daf8459726a93443d11b0a to your computer and use it in GitHub Desktop.
Script to setup my mac from scratch, based on my preferences and usage
This file contains hidden or 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
#!/usr/bin/env zsh | |
############################################################################# | |
# # | |
# Begin SSH key generation # | |
# # | |
############################################################################# | |
echo "Creating an SSH key..." | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
# Start ssh agent to store the newly generated key | |
eval "$(ssh-agent -s)" | |
echo "Host * | |
AddKeysToAgent yes | |
UseKeychain yes | |
IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config | |
ssh-add -K ~/.ssh/id_rsa | |
echo "Please add this public key to Github \n" | |
echo "https://github.com/account/ssh \n" | |
read -p "Press [Enter] key after this..." | |
############################################################################# | |
# # | |
# Begin Xcode tools install # | |
# # | |
############################################################################# | |
echo "Installing XCode tools" | |
xcode-select --install | |
############################################################################# | |
# # | |
# Begin brew install # | |
# # | |
############################################################################# | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew tap caskroom/cask | |
brew install mas | |
############################################################################# | |
# # | |
# Begin mac AppStore apps installation # | |
# # | |
############################################################################# | |
otherMacApps=( | |
824183456 #affinity photo | |
824171161 #affinity designer | |
) | |
myMacApps=( | |
937984704 #amphetamine | |
1147396723 #whatsapp | |
409201541 #pages | |
409183694 #keynote | |
1320666476 #wipr | |
409203825 #numbers | |
441258766 #magnet | |
) | |
mas signin [email protected] | |
mas install ${otherMacApps[@]} | |
mas signout | |
mas signin [email protected] | |
mas install ${myMacApps[@]} | |
############################################################################# | |
# # | |
# Begin app installation # | |
# # | |
############################################################################# | |
internetApps=( | |
vlc | |
appcleaner | |
spotify | |
transmission | |
sublime-text | |
firefox | |
authy | |
) | |
brew cask install ${internetApps[@]} | |
brew cask cleanup | |
brew cleanup | |
############################################################################# | |
# # | |
# Begin oh my zsh installation # | |
# # | |
############################################################################# | |
curl -L http://install.ohmyz.sh | sh | |
curl -L -o ~/.oh-my-zsh/custom/themes/materialshell.zsh-theme https://raw.githubusercontent.com/carloscuesta/materialshell/master/materialshell.zsh | |
# TODO: import theme in Terminal app | |
############################################################################# | |
# # | |
# Begin macOS customization # | |
# # | |
############################################################################# | |
#"Use `~/Downloads/Incomplete` to store incomplete downloads" | |
defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true | |
defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Downloads/Incomplete" | |
#"Don't prompt for confirmation before downloading" | |
defaults write org.m0k.transmission DownloadAsk -bool false | |
#"Trash original torrent files" | |
defaults write org.m0k.transmission DeleteOriginalTorrent -bool true | |
#"Hide the donate message" | |
defaults write org.m0k.transmission WarningDonate -bool false | |
#"Hide the legal disclaimer" | |
defaults write org.m0k.transmission WarningLegal -bool false | |
# Don’t automatically rearrange Spaces based on most recent use | |
defaults write com.apple.dock mru-spaces -bool false | |
# Reset LaunchPad app placement | |
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock | |
############################################################################# | |
# # | |
# Begin other customizations # | |
# # | |
############################################################################# | |
mkdir ~/projects | |
# TODO: Install FiraCode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment