These are the dotfiles and scripts that I use to setup and maintain my Mac.
On a new machine or fresh macOS install: before you can do much on the command line (like using Git), Xcode Command Line Tools need to be installed and the license agreed to.
- Open Applications > Utilites > Terminal
- Install Xcode Command Line Tools
xcode-select --install
- Click install, agree to license
You can clone the repository wherever you want. I like to keep it in ~/Projects/dotfiles
.
git clone https://github.com/jsnmrs/dotfiles.git && cd dotfiles
The home/install.sh script will run a copy all of the dotfiles (.*) in home/
into to your home folder.
Take a look through the dotfiles (.*) before running bootstrap.sh to make any adjustments. The script will warn that files in your home folder will be overwritten.
Run it: source home/install.sh
If ~/.extra
exists, it will be sourced along with the other files. You can use this to add commands and settings you don’t want to commit to a public repository. My ~/.extra
looks something like this:
# Git credentials
GIT_AUTHOR_NAME="Jason Morris"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="jason@mailinator.com"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
# Project aliases
alias clientsite="cd ~/Projects/clientsite"
alias businesspapers="cd ~/Projects/my/important/business/papers"
# Access tokens
export APItoken=0000ffff0000ffff0000ffff0000ffff0000ffff
The homebrew/install.sh script will:
- Install (or update) Homebrew
- Install a list of Homebrew formulae
- Install a list of fonts via Homebrew cask
- Install a list of Mac App Store applications via
mas
- Install a list of applications via Homebrew Cask
Run it: source homebrew/install.sh
The node/install.sh script will:
- Install (or update) NVM
- Install (or update to) the latest stable version of Node.js
- Install list of global Node modules.
Run it: source node/install.sh
The ruby/install.sh script will:
- Install (or update) RVM
- Run RVM setup script
- Install list of Ruby gems
Run it: source ruby/install.sh
The composer/install.sh script will:
- Check for Composer installation
- Copy composer.json into
/.composer
- Run
composer update
Run it: source composer/install.sh
The sublime/install.sh
script will:
- Copy
Package Control.sublime-settings
andPreferences.sublime-settings
from this repo into~/Library/Application Support/Sublime Text 3/Packages/User
Run it: source sublime/install.sh
Afterwards, install Package Control and restart Sublime Text to install all of the configured packages.
The macos/configure-macos.sh script is a blend of Kevin Deldycke’s macos-config.sh and Mathias Bynens’ .macos scripts. It sets a number of sensible defaults for macOS. Tip: review and comment out uncertain commands before running.
Run it: source macos/configure-macos.sh
The macos/configure-dock.sh script will clear and add specific application icons to the dock.
Run it: source macos/configure-dock.sh
brew list
– list installed Homebrew formulae, including casksmas list
– list installed applications from Mac App Storenpm list -g [--depth=0]
– list globally installed node modulesgem query --local
– list locally installed Ruby gemscomposer global show
– list globally installed Composer packages