├── LICENSE ├── README.md └── setup.py /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Aerolab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Aerolab Setup 2 | 3 | This will install the most popular tools and tweaks we use at Aerolab 4 | 5 | Open Terminal, type this and press enter: 6 | 7 | ```shell 8 | /usr/bin/python -c "$(curl -fsSL https://raw.githubusercontent.com/Aerolab/setup/master/setup.py)" 9 | ``` 10 | 11 | Follow the instructions and that's it :D 12 | 13 | ### Software: 14 | 15 | * Brew & Brew Cask with AutoUpdate 16 | * Node.js, Ruby, Python, Bower, Gulp, Grunt and Git 17 | * Atom, Sublime Text 3 & Package Control and VIM 18 | * A bunch of Fonts, including our beloved Dosis 19 | * Essential Quicklook plugins (so you can view code, zip contents and other things) 20 | * Essential Software, including Chrome, iTerm2, Dropbox, Slack, Sublime, and a few more. 21 | * A lot of OSX tweaks, like disabling the annoying Mac startup sound 22 | 23 | ### Options 24 | 25 | * *Developer Tools*: Docker Toolbox, Sequel Pro, Cyberduck, ngrok 26 | * *Android Tools*: Java, Android Studio 27 | * *iOS Tools*: Cocoapods 28 | * *Web Developer Tools*: Imageoptim 29 | * *Designer Tools*: Invision Sync, Scala Preview 30 | * *Sublime Text 3*: Emmet, Markdown, SASS, Linters, Git, Material Theme and other packages. 31 | * *Oh My Zsh*: Zsh, but better. Also includes an iTerm2 Theme and Powerline Fonts. 32 | * *Animations*: Makes all the Finder animations (Spaces, Exposé, Resizing) much faster. 33 | 34 | ### Mac App Store Tools 35 | 36 | * You can install mas by typing **brew install mas**, which lets you install App Store apps via the command line. 37 | * *The Basics*: [Keynote](https://itunes.apple.com/en/app/keynote/id409183694), [Numbers](https://itunes.apple.com/en/app/numbers/id409203825), [Pages](https://itunes.apple.com/en/app/pages/id409201541) 38 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/Library/Frameworks/Python.framework/Versions/2.7/bin/python 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import json 6 | import urllib2 7 | import subprocess 8 | 9 | name = '' 10 | email = '' 11 | options = { 'developer': '', 'android': '', 'ios': '', 'designer': '', 12 | 'vim': '', 'zsh': '', 13 | 'animations': '', 'showhiddenfiles': '', 'autoupdate': '', } 14 | 15 | 16 | # Check if Xcode Command Line Tools are installed 17 | if os.system('xcode-select -p') != 0: 18 | print "Installing XCode Tools" 19 | os.system('xcode-select --install') 20 | os.system('softwareupdate --install-rosetta --agree-to-license') 21 | print "**************************************************************" 22 | print "Install the XCode Command Line Tools and run this script again" 23 | print "**************************************************************" 24 | exit() 25 | 26 | # Accept XCode License 27 | # os.system('sudo xcodebuild -license accept') 28 | 29 | # Sudo: Spectacle, ZSH, OSX Settings 30 | print "\n\nWelcome... TO THE WORLD OF TOMORROW\n" 31 | 32 | # Basic Info 33 | while name == '': 34 | name = raw_input("What's your name?\n").strip() 35 | 36 | while email == '' or '@' not in email: 37 | email = raw_input("What's your work email?\n").strip() 38 | 39 | 40 | # Setup Options 41 | while options['designer'] not in ['y', 'n']: 42 | options['designer'] = raw_input("Do you want to install Designer Tools? (y|n) [y] ") or "y" 43 | 44 | while options['developer'] not in ['y', 'n']: 45 | options['developer'] = raw_input("Do you want to install Developer Tools? (y|n) [y] ") or "y" 46 | 47 | if options['developer'] == 'y': 48 | while options['android'] not in ['y', 'n']: 49 | options['android'] = raw_input("Do you want to install Android Tools? (y|n) [n] ") or "n" 50 | 51 | while options['ios'] not in ['y', 'n']: 52 | options['ios'] = raw_input("Do you want to install iOS Tools? (y|n) [n] ") or "n" 53 | 54 | 55 | # Other Options 56 | while options['vim'] not in ['y', 'n']: 57 | options['vim'] = raw_input("Do you want to install VIM with Awesome VIM? (y|n) [y] ") or "y" 58 | 59 | while options['zsh'] not in ['y', 'n']: 60 | options['zsh'] = raw_input("Do you want to install Oh My Zsh? (y|n) [y] ") or "y" 61 | 62 | while options['animations'] not in ['y', 'n']: 63 | options['animations'] = raw_input("Do you want to accelerate OSX animations? (y|n) [y] ") or "y" 64 | 65 | while options['showhiddenfiles'] not in ['y', 'n']: 66 | options['showhiddenfiles'] = raw_input("Do you want to show hidden files? (y|n) [y] ") or "y" 67 | 68 | while options['autoupdate'] not in ['y', 'n']: 69 | options['autoupdate'] = raw_input("Do you want to update your computer automatically? (y|n) [y] ") or "y" 70 | 71 | 72 | def show_notification(text): 73 | os.system('osascript -e \'display notification "'+ text +'" with title "Mac Setup"\' > /dev/null') 74 | 75 | 76 | print "Hi %s!" % name 77 | print "You'll be asked for your password at a few points in the process" 78 | print "*************************************" 79 | print "Setting up your Mac..." 80 | print "*************************************" 81 | 82 | 83 | # Create a Private Key 84 | if not os.path.isfile(os.path.expanduser("~") + '/.ssh/id_rsa.pub') : 85 | print "Creating your Private Key" 86 | os.system('ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N "" -C "%s"' % email) 87 | 88 | 89 | # Set computer name & git info (as done via System Preferences → Sharing) 90 | os.system('sudo scutil --set ComputerName "%s"' % name) 91 | os.system('sudo scutil --set HostName "%s"' % name) 92 | os.system('sudo scutil --set LocalHostName "%s"' % name.replace(' ', '-')) # Doesn't support spaces 93 | os.system('sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "%s"' % name) 94 | os.system('git config --global user.name "%s"' % name) 95 | os.system('git config --global user.email "%s"' % email) 96 | 97 | # Install Brew & Brew Cask 98 | print "Installing Brew & Brew Cask" 99 | os.system('touch ~/.bash_profile') 100 | os.system('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"') 101 | os.system('brew tap homebrew/cask-versions') 102 | os.system('brew tap homebrew/cask-fonts') 103 | os.system('brew update && brew upgrade && brew cleanup') 104 | 105 | 106 | # Install Languages 107 | print "Installing Git+NodeJS" 108 | os.system('brew install git node') 109 | os.system('brew link --overwrite git node') 110 | os.system('brew install git-flow git-lfs svn') # For some reason most fonts require SVN 111 | os.system('git lfs install') 112 | 113 | print "Installing Useful Stuff" 114 | os.system('brew install graphicsmagick curl wget sqlite libpng libxml2 openssl') 115 | 116 | print "Installing Command Line Tools" 117 | os.system('npm install -g node-gyp serve yarn') 118 | 119 | # OSX Tweaks & Essentials 120 | print "Installing Quicklook Helpers" 121 | os.system('brew install qlcolorcode qlstephen qlmarkdown quicklook-csv quicklook-json qlimagesize webpquicklook suspicious-package qlprettypatch quicklookase qlvideo') 122 | # Permissions Fix for macOS Catalina 123 | os.system('xattr -d -r com.apple.quarantine ~/Library/QuickLook') 124 | 125 | print "Installing Essential Apps" 126 | os.system('brew install iterm2 the-unarchiver rectangle google-chrome visual-studio-code spotify slack discord') 127 | 128 | print "Installing Fonts" 129 | os.system('brew install font-dosis font-droid-sans-mono-for-powerline font-open-sans font-roboto font-roboto-mono font-roboto-slab font-consolas-for-powerline font-inconsolata font-inconsolata-for-powerline font-lato font-menlo-for-powerline font-meslo-lg font-meslo-for-powerline font-noto-sans font-noto-serif font-source-sans-pro font-source-serif-pro font-ubuntu font-pt-mono font-pt-sans font-pt-serif font-fira-mono font-fira-mono-for-powerline font-fira-code font-fira-sans font-source-code-pro font-hack font-anka-coder font-jetbrains-mono') 130 | 131 | # Appropriate Software 132 | if options['developer'] == 'y': 133 | print "Installing Developer Tools" 134 | os.system('brew install --cask docker') 135 | os.system('brew install sequel-pro postman imageoptim imagealpha xnconvert') 136 | os.system('curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash') 137 | 138 | if options['android'] == 'y': 139 | print "Installing Android Tools" 140 | os.system('brew fetch java') 141 | show_notification("We need your password") 142 | os.system('brew install java') 143 | os.system('brew install android-studio') 144 | os.system('brew install android-platform-tools') 145 | 146 | if options['ios'] == 'y': 147 | print "Installing iOS Tools" 148 | show_notification("We need your password") 149 | os.system('sudo gem install cocoapods') 150 | show_notification("We need your password") 151 | os.system('sudo gem install fastlane --verbose') 152 | 153 | if options['designer'] == 'y': 154 | print "Installing Designer Tools" 155 | os.system('brew install figma') 156 | 157 | if options['vim'] == 'y': 158 | print "Installing VIM + Awesome VIM" 159 | 160 | os.system('brew install vim') 161 | os.system('git clone https://github.com/amix/vimrc.git ~/.vim_runtime') 162 | os.system('sh ~/.vim_runtime/install_awesome_vimrc.sh') 163 | 164 | # Oh-My-ZSH. Dracula Theme for iTerm2 needs to be installed manually 165 | if options['zsh'] == 'y': 166 | print "Installing Oh-My-Zsh with Dracula Theme" 167 | show_notification("We need your password") 168 | 169 | # Setup Adapted from https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh 170 | if os.system('test -d ~/.oh-my-zsh') != 0: 171 | os.system('umask g-w,o-w && git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh') 172 | if os.system('test -f ~/.zshrc') != 0: 173 | os.system('cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc') 174 | 175 | # If the user has the default .zshrc tune it a bit 176 | if (subprocess.call(['bash', '-c', 'diff <(tail -n +6 ~/.zshrc) <(tail -n +6 ~/.oh-my-zsh/templates/zshrc.zsh-template) > /dev/null']) == 0): 177 | 178 | # Plugins 179 | os.system('brew install zsh-autosuggestions zsh-syntax-highlighting bat tldr tree') 180 | os.system('echo "source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc'); 181 | os.system('echo "source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc'); 182 | os.system('sed -i -e \'s/plugins=(git)/plugins=(git brew node npm docker colored-man-pages copypath copyfile extract)/g\' ~/.zshrc &> /dev/null') 183 | 184 | # Agnoster Theme 185 | os.system('sed -i -e \'s/robbyrussell/agnoster/g\' ~/.zshrc &> /dev/null') 186 | 187 | # Customizations 188 | os.system('echo "alias dog=\'bat\'" >> ~/.zshrc') 189 | # Don't show the user in the prompt 190 | os.system('echo "DEFAULT_USER=\`whoami\`" >> ~/.zshrc') 191 | 192 | os.system('echo "export NVM_DIR=\"\$HOME/.nvm\"\n[ -s \"\$NVM_DIR/nvm.sh\" ] && . \"\$NVM_DIR/nvm.sh\" # This loads nvm" >> ~/.zshrc') 193 | 194 | # Remove the 'last login' message 195 | os.system('touch ~/.hushlogin') 196 | 197 | os.system('git clone https://github.com/dracula/iterm.git ~/Desktop/dracula-theme/') 198 | 199 | 200 | # Random OSX Settings 201 | print "Tweaking OSX Settings" 202 | 203 | if options['showhiddenfiles'] == 'y': 204 | # Finder: show hidden files by default 205 | os.system('defaults write com.apple.finder AppleShowAllFiles -bool true') 206 | # Finder: show all filename extensions 207 | os.system('defaults write NSGlobalDomain AppleShowAllExtensions -bool true') 208 | 209 | 210 | # Finder: allow text selection in Quick Look 211 | os.system('defaults write com.apple.finder QLEnableTextSelection -bool true') 212 | # Check for software updates daily 213 | os.system('defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1') 214 | # Disable auto-correct 215 | #os.system('defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false') 216 | # Require password immediately after sleep or screen saver begins 217 | os.system('defaults write com.apple.screensaver askForPassword -int 1') 218 | os.system('defaults write com.apple.screensaver askForPasswordDelay -int 0') 219 | # Show the ~/Library folder 220 | os.system('chflags nohidden ~/Library') 221 | # Don’t automatically rearrange Spaces based on most recent use 222 | os.system('defaults write com.apple.dock mru-spaces -bool false') 223 | # Prevent Time Machine from prompting to use new hard drives as backup volume 224 | os.system('defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true') 225 | 226 | 227 | if options['animations'] == 'y': 228 | print "Tweaking System Animations" 229 | os.system('defaults write NSGlobalDomain NSWindowResizeTime -float 0.1') 230 | os.system('defaults write com.apple.dock expose-animation-duration -float 0.15') 231 | os.system('defaults write com.apple.dock autohide-delay -float 0') 232 | os.system('defaults write com.apple.dock autohide-time-modifier -float 0.3') 233 | os.system('defaults write NSGlobalDomain com.apple.springing.delay -float 0.5') 234 | os.system('killall Dock') 235 | 236 | 237 | if options['autoupdate'] == 'y': 238 | print "Enabling Automatic Brew Updates & Upgrades" 239 | os.system('brew tap homebrew/autoupdate') 240 | os.system('brew autoupdate start --upgrade') 241 | 242 | 243 | # Make Google Chrome the default browser 244 | os.system('open -a "Google Chrome" --args --make-default-browser') 245 | 246 | # Open Rectangle (Needs to be enabled manually) 247 | os.system('open -a "Rectangle"') 248 | 249 | # Clean Up 250 | os.system('brew cleanup') 251 | 252 | 253 | # Mute startup sound 254 | show_notification("We need your password") 255 | os.system('sudo nvram SystemAudioVolume=%00') 256 | 257 | 258 | print "" 259 | print "" 260 | print "*************************************" 261 | print "Enabling FileVault" 262 | os.system('sudo fdesetup enable') 263 | print "" 264 | 265 | print "*************************************" 266 | print "Your SSH Public Key Is:" 267 | with open(os.path.expanduser("~") + '/.ssh/id_rsa.pub', 'r') as f: 268 | print f.read() 269 | print "" 270 | 271 | if options['zsh'] == 'y': 272 | print "*************************************" 273 | print "Remember to set up iTerm2:" 274 | print "* Go to iTerm2 > Preferences > Profiles > Colors Tab" 275 | print " * Load Presets..." 276 | print " * Import..." 277 | print " * Pick Desktop > dracula-theme > iterm > Dracula.itermcolors" 278 | print "* Go to iTerm2 > Preferences > Profiles > Text Tab" 279 | print " * Regular Font" 280 | print " * 12pt Menlo for Powerline Font" 281 | print "" 282 | 283 | print "*************************************" 284 | print "Remember to restart your Mac" 285 | print "*************************************" 286 | 287 | show_notification("All done! Enjoy your new macOS!") 288 | 289 | 290 | # Change the shell if necessary 291 | if options['zsh'] == 'y': 292 | os.system('chsh -s /bin/zsh &> /dev/null') 293 | --------------------------------------------------------------------------------