My OS X dotfiles.
How to install
The installation step requires the XCode Command Line Tools and may overwrite existing dotfiles in your HOME directory.
$ bash -c "$(curl -fsSL raw.github.com/Wilto/dotfiles/master/bin/dotfiles)"
N.B. If you wish to fork this project and maintain your own dotfiles, you must
substitute my username for your own in the above command and the 2 variables
found at the top of the
How to update
You should run the update when:
- You make a change to
~/.dotfiles/git/gitconfig(the only file that is copied rather than symlinked).
- You want to pull changes from the remote repository.
- You want to update Homebrew formulae and Node packages.
Run the dotfiles command:
||List of additional applications to install|
||Suppress package updates|
||Suppress pulling from the remote repository|
Automatic software installation
N.B. If your pre-existing Homebrew installation is not in
/usr/local then you
must prepend your custom installation's
bin to the PATH in
# Add `brew` command's custom location to PATH PATH="/opt/acme/bin:$PATH"
Custom OS X defaults
Custom OS X settings can be applied during the
dotfiles process. They can
also be applied independently by running the following command:
Bootable backup-drive script
These dotfiles include a script that will incrementally back up your data to an
external, bootable clone of your computer's internal drive. First, make sure
that the value of
DST in the
bin/backup script matches the name of your
backup-drive. Then run the following command:
For more information on how to setup your backup-drive, please read the preparatory steps in this post on creating a Mac OS X bootable backup drive.
Custom bash prompt
I use a custom bash prompt based on the Solarized color palette and influenced by @gf3's and @cowboy's custom prompts. For best results, you should install iTerm2 and import Solarized Dark.itermcolors.
When your current working directory is a Git repository, the prompt will display the checked-out branch's name (and failing that, the commit SHA that HEAD is pointing to). The state of the working tree is reflected in the following way:
||Uncommitted changes in the index|
Further details are in the
Also, because I would constantly find myself working on
gh-pages despite having it right there in my prompt, I added a little color hinting on the current branch. While I was at it, I set any branch with “stable” in the name in an extra scary shade of red.
Local and private configurations
Any special-case Vim directives local to a machine should be stored in a
.vimrc.local file on that machine. The directives will then be automatically
imported into your master
Any private and custom commands should be stored in a
file. Any commands included in this file will not be under version control or
committed to a public repository. If
~/.bash_profile.local exists, it will be
sourced for inclusion in
Here is an example
# PATH exports PATH=$PATH:~/.gem/ruby/1.8/bin export PATH # Git credentials # Not under version control to prevent people from # accidentally committing with your details GIT_AUTHOR_NAME="Muscles McTouchdown" GIT_AUTHOR_EMAIL="firstname.lastname@example.org" GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" # Set the credentials (modifies ~/.gitconfig) git config --global user.name "$GIT_AUTHOR_NAME" git config --global user.email "$GIT_AUTHOR_EMAIL"
git/gitconfig file is copied to
~/.gitconfig, so any private git
configuration specified in
~/.bash_profile.local will not be committed to
your dotfiles repository.
Inspiration and code was taken from many sources, including:
- Again: this is basically a simplified and tweaked version of @necolas’s dotfiles. Check out his dotfiles repo at https://github.com/necolas/dotfiles, especially if you’re Vim-inclined.
- @mathiasbynens (Mathias Bynens) https://github.com/mathiasbynens/dotfiles
- @tejr (Tom Ryder) https://github.com/tejr/dotfiles
- @gf3 (Gianni Chiappetta) https://github.com/gf3/dotfiles
- @cowboy (Ben Alman) https://github.com/cowboy/dotfiles