This is the documentation on our mac setup scripts. You can use this to learn more about our scripts (so that you can run them or improve them) and to write similar scripts yourself.
If you haven't yet done a basic bash scripting tutorial, you may want to do that before proceeding, but you may also be able to understand all of this without much experience . . . this could even be a good way to get started scripting, because the setup scripts are extremely simple logically and syntactically. The only difficulties you'll face setting them up will involve finding the individual settings you can change and executing all of your commands in the right order. But the setup script is really just a series of very simple single-line commands.
The first thing we need to do is to get Homebrew installed. The easiest thing to do is
mas
to download from the App Store--we'll discuss this later)/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
There are bunch of directions you can take from here, Once homebrew is installed, you need a couple of initial apps to get started:
brew install git
brew install node
brew cask install atom
With git
, node
and atom
installed, you are all set to clone this repository with git
, install its dependencies with node
(well, npm
to be precise, and you won't really need this for macsetup, but you will for everything else--so go ahead and do it), and tweak any and all scripts to your liking with atom
. Here is an example of the commands you might enter next
mkdir Development
cd Development
git clone https://github.com/mkuzmick/the-tools.git
cd the-tools
npm install
atom .
# then tweak 01a_manual_start.sh or 02_mainbrew.sh
./02_mainbrew.sh
./03_preferences.sh
./04_fonts.sh
./05_atom.sh
./06_npm.sh
Again, you'll want to tweak all of those scripts before running them. And to learn how to do this, we'll provide basic explanations of each of these script bundles below.
Homebrew is a package manager for the Mac. It is very hard--maybe impossible--to live without if you are going to be coding on your Mac, or even if you just need to spend some time in your Mac's Terminal using command line tools. It is so so so much easier installing these tools with Homebrew than it is to go in search of each and every package you need. Here's the bare minimum you're going to need:
brew install git
brew install node
brew cask install atom
brew install awscli
brew install ffmpeg
brew install youtube-dl
brew cask install google-chrome
We also tend to add
brew cask install firefox
brew cask install vlc
brew cask install nvalt
brew cask install blender
brew cask install unity-hub
brew cask install spotify
brew cask install mas
You can change many (not absolutely all, but many) preferences and settings from the command line, and this means that you can add these preferences to your macsetup
script.
To get started, open up terminal and type defaults read
. You will be overwhelmed by how much output you see, but if you scroll through it, you should see loads and loads of "key" = value
pairs that have the names of familiar (and unfamiliar) settings. These preferences can also be seen in the many many .plist
files you can find in ~/Library/Preferences
. To see just ONE value or one cluster of values, you can try commands like these:
defaults read com.apple.Safari
defaults read com.apple.finder ShowStatusBar
defaults read com.apple.screencapture location
In a great piece on setting preferences from the command line, Pawel Gryzybek recommends the following workflow:
defaults read > before
defaults read > after
diff before after
You'll end up finding something like
"com.apple.menuextra.battery" = {
ShowPercent = YES;
};
And this would mean that the command you want to add to your setup scripts is
defaults write com.apple.menuextra.battery ShowPercent -bool YES
And that's basically it. You'll want to make sure that you add a comment that helps the future you understand what this line does, like
# show battery percentage in task bar
defaults write com.apple.menuextra.battery ShowPercent -bool YES
And then you can always comment things out if you don't think you'll use them all the time:
# show battery percentage in task bar
# defaults write com.apple.menuextra.battery ShowPercent -bool YES
There are additional complications that we'll address here eventually:
~/Library/Preferences
are in ~/Library/Containers
. For instance, TextEdit's preferences can be found at /Users/mk/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist
. For more information on why some apps write their preferences to ~/Library/Containers, check out this link.defaults write -app "Final Cut Pro" FFImportCopyToMediaFolder -bool false
, for instance, is what you'd do if you wanted to leave files in place on import by default in FCPX.defaults
command at all (power management settings, for instance)For more info you are invited to check out these links:
.plist
files, etc.Coming soon.
Coming soon.
Coming soon.
Coming soon.
Extras of all sorts.
If you would like to help us build these scripts, here are the things we need next. Go ahead and submit a pull request, or just slack MK your new command if you find a way to accomplish what you need to accomplish with a terminal command.
xattr -d com.apple.quarantine /Volumes/mk_storage/R20_Install_Mac.dmg
or similar before installing/Users/ll/Library/Application Support/Blender/2.80/config/userpref.blend
.mov
, aiff
, wav
, etc. with QuickTime, for instance (good link on using duti for this here)brew install mas
back in to do this---and a logi).md
files in Atom (in package settings--can this be automated from the command line?)AppleShowScrollBars = WhenScrolling;
heroku login
~/Desktop
)~/Desktop/sidebar-and-markdown-ft-default
)npm link
for the-tools