Forked from matthewmueller/osx-for-hackers.sh
Last active
September 10, 2019 12:26
-
-
Save Ibexian/0f9bf0f46746439efc5e to your computer and use it in GitHub Desktop.
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
| # Ask for the administrator password upfront | |
| sudo -v | |
| echo "This script will make your Mac awesome" | |
| ############################################################################### | |
| # General UI/UX | |
| ############################################################################### | |
| echo "Disabling OS X Gate Keeper" | |
| echo "(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 | |
| echo "" | |
| echo "Automatically quit printer app once the print jobs complete" | |
| defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true | |
| # Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` | |
| echo "" | |
| echo "Displaying ASCII control characters using caret notation in standard text views" | |
| defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true | |
| echo "" | |
| echo "Reveal IP address, hostname, OS version, etc. when clicking the clock in the login window" | |
| sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName | |
| echo "" | |
| echo "Disable smart quotes and smart dashes as they’re annoying when typing code" | |
| defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false | |
| defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false | |
| ############################################################################### | |
| # Trackpad, mouse, keyboard, Bluetooth accessories, and input | |
| ############################################################################### | |
| echo "" | |
| echo "Disabling press-and-hold for keys in favor of a key repeat" | |
| defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
| echo "" | |
| echo "Setting a blazingly fast keyboard repeat rate (ain't nobody got time fo special chars while coding!)" | |
| defaults write NSGlobalDomain KeyRepeat -int 0 | |
| ############################################################################### | |
| # Screen | |
| ############################################################################### | |
| echo "" | |
| echo "Enabling subpixel font rendering on non-Apple LCDs" | |
| defaults write NSGlobalDomain AppleFontSmoothing -int 2 | |
| ############################################################################### | |
| # Finder | |
| ############################################################################### | |
| echo "" | |
| echo "Showing all filename extensions in Finder by default" | |
| defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
| echo "" | |
| echo "Showing status bar in Finder by default" | |
| defaults write com.apple.finder ShowStatusBar -bool true | |
| echo "" | |
| echo "Allowing text selection in Quick Look/Preview in Finder by default" | |
| defaults write com.apple.finder QLEnableTextSelection -bool true | |
| echo "" | |
| echo "Displaying full POSIX path as Finder window title" | |
| defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | |
| echo "" | |
| echo "Use column view in all Finder windows by default" | |
| defaults write com.apple.finder FXPreferredViewStyle Clmv | |
| echo "" | |
| echo "Avoiding the creation of .DS_Store files on network volumes" | |
| defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
| ############################################################################### | |
| # Dock & Mission Control | |
| ############################################################################### | |
| echo "" | |
| echo "Speeding up Mission Control animations and grouping windows by application" | |
| defaults write com.apple.dock expose-animation-duration -float 0.1 | |
| defaults write com.apple.dock "expose-group-by-app" -bool true | |
| ############################################################################### | |
| # Personal Additions | |
| ############################################################################### | |
| echo "" | |
| echo "Speeding up wake from sleep to 24 hours from an hour" | |
| # http://www.cultofmac.com/221392/quick-hack-speeds-up-retina-macbooks-wake-from-sleep-os-x-tips/ | |
| sudo pmset -a standbydelay 86400 | |
| ############################################################################### | |
| # Installations | |
| ############################################################################### | |
| echo "" | |
| echo "Install Brew" | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| echo "" | |
| echo "Install Cask" | |
| brew install caskroom/cask/brew-cask | |
| echo "" | |
| echo "Upgrade 'em" | |
| brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup | |
| echo "" | |
| echo "set paths" | |
| echo "PATH=/usr/local/bin:$PATH" >> ~/.bashrc | |
| source ~/.bashrc | |
| echo $PATH | |
| echo "" | |
| echo "Install Sublime" | |
| brew cask install sublime-text | |
| echo "" | |
| echo "spotify" | |
| brew cask install spotify | |
| brew cask install spotify-notifications | |
| echo "" | |
| echo "dropbox" | |
| brew cask install dropbox | |
| echo "" | |
| echo "Install Mackup backup" | |
| brew install mackup | |
| echo "" | |
| echo "Google things" | |
| brew cask install google-drive | |
| brew cask install google-chrome | |
| echo "" | |
| echo "Install Steam - super important" | |
| brew cask install steam | |
| echo "" | |
| echo "NVM and Node" | |
| brew install nvm | |
| echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.bashrc | |
| nvm install stable | |
| echo "Store screenshots in subfolder on desktop" | |
| mkdir ~/Desktop/Screenshots | |
| defaults write com.apple.screencapture location ~/Desktop/Screenshots | |
| echo "Done!" | |
| echo "" | |
| echo "ToDo: use mackup, install cheatsheet, install bartender, RVM" | |
| echo "hub, oversight, f.lux, Boom 2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment