Last active
September 19, 2024 08:33
-
-
Save muratcakmak/87d3fbf67d24085fddcf2286214f51e4 to your computer and use it in GitHub Desktop.
New Mac Setup Script Raw
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
#!/bin/sh | |
# ___ __ __ ____ _ ____ _ | |
# / _ \| \/ |/ ___( )___ / ___| ___| |_ _ _ _ __ | |
# | | | | |\/| | | |// __| \___ \ / _ \ __| | | | '_ \ | |
# | |_| | | | | |___ \__ \ ___) | __/ |_| |_| | |_) | | |
# \___/|_| |_|\____| |___/ |____/ \___|\__|\__,_| .__/ | |
# |_| | |
echo "Creating an SSH key for you..." | |
ssh-keygen -t rsa | |
echo "Please add this public key to Github \n" | |
echo "https://github.com/account/ssh \n" | |
read -p "Press [Enter] key after this..." | |
echo "Installing xcode-stuff" | |
xcode-select --install | |
# Check for Homebrew, | |
# Install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Update homebrew recipes | |
echo "Updating homebrew..." | |
brew update | |
echo "Installing Git..." | |
brew install git | |
echo "Git config" | |
git config --global user.name "Oguzhan Cakmak" | |
git config --global user.email oguzhanmc@gmail.com | |
echo "Installing other brew stuff..." | |
brew install cocoapods | |
brew install tree | |
brew install wget | |
brew install trash | |
brew install node | |
brew install yarn | |
brew install git-extras | |
brew install thefuck | |
brew install z | |
brew install gh | |
echo "Cleaning up brew" | |
brew cleanup | |
echo "Installing homebrew cask" | |
brew install caskroom/cask/brew-cask | |
#Install Zsh & Oh My Zsh | |
echo "Installing Oh My ZSH..." | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"\n | |
echo "Setting up Zsh plugins..." | |
cd ~/.oh-my-zsh/custom/plugins | |
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git | |
# Apps | |
apps=( | |
# Development | |
android-studio | |
iterm2 | |
sequel-pro | |
visual-studio-code | |
vagrant | |
# Utilities | |
firefox | |
google-chrome | |
raycast | |
min | |
monitorcontrol | |
# Media | |
spotify | |
vlc | |
skype | |
) | |
# Install apps to /Applications | |
# Default is: /Users/$user/Applications | |
echo "installing apps with Cask..." | |
brew install --appdir="/Applications" ${apps[@]} --cask | |
brew cleanup | |
# Install expo command-line tools | |
echo | |
npm install --global expo-cli | |
############################################################################### | |
# General | |
############################################################################### | |
#"Disabling OS X Gate Keeper" | |
#"(You'll be able to install any app you want from here on, not just Mac App Store apps)" | |
sudo spctl --master-disable | |
sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
#"Saving to disk (not to iCloud) by default" | |
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false | |
#"Disable smart quotes and smart dashes as they are annoying when typing code" | |
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false | |
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false | |
#"Enabling full keyboard access for all controls (e.g. enable Tab in modal dialogs)" | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
#"Showing all filename extensions in Finder by default" | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
#"Disabling the warning when changing a file extension" | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false | |
#"Use column view in all Finder windows by default" | |
defaults write com.apple.finder FXPreferredViewStyle Clmv | |
#"Avoiding the creation of .DS_Store files on network volumes" | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
#"Setting email addresses to copy as 'foo@example.com' instead of 'Foo Bar <foo@example.com>' in Mail.app" | |
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false | |
#"Setting Dock to auto-hide and removing the auto-hiding delay" | |
defaults write com.apple.dock autohide -bool true | |
defaults write com.apple.dock autohide-delay -float 0 | |
defaults write com.apple.dock autohide-time-modifier -float 0 | |
#"Setting the icon size of Dock items to 36 pixels for optimal size/screen-realestate" | |
defaults write com.apple.dock tilesize -int 36 | |
############################################################################### | |
# Screen | |
############################################################################### | |
#"Setting screenshots location to ~/Desktop" | |
defaults write com.apple.screencapture location -string "$HOME/Desktop" | |
#"Setting screenshot format to PNG" | |
defaults write com.apple.screencapture type -string "png" | |
############################################################################### | |
# Chrome, Safari, & WebKit | |
############################################################################### | |
#"Hiding Safari's bookmarks bar by default" | |
defaults write com.apple.Safari ShowFavoritesBar -bool false | |
#"Hiding Safari's sidebar in Top Sites" | |
defaults write com.apple.Safari ShowSidebarInTopSites -bool false | |
#"Disabling Safari's thumbnail cache for History and Top Sites" | |
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 | |
#"Enabling Safari's debug menu" | |
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true | |
#"Making Safari's search banners default to Contains instead of Starts With" | |
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false | |
#"Removing useless icons from Safari's bookmarks bar" | |
defaults write com.apple.Safari ProxiesInBookmarksBar "()" | |
#"Allow hitting the Backspace key to go to the previous page in history" | |
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true | |
#"Enabling the Develop menu and the Web Inspector in Safari" | |
defaults write com.apple.Safari IncludeDevelopMenu -bool true | |
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true | |
defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true | |
#"Adding a context menu item for showing the Web Inspector in web views" | |
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true | |
#"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 | |
killall Finder | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment