weisjohn / dotfiles

.files, including ~/.osx — sensible hacker defaults for OS X

Home Page:http://mths.be/dotfiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weisjohn's dotfiles ( an unholy merger of Mathia's and Ben Alman's dotfile repos )

Brand new OSX machine awesomeness... when you have nothing...

Install the XCode

bash -c "$(curl -fsSL https://raw.github.com/weisjohn/dotfiles/master/bin/dotfiles)"

Why is this a git repo?

The command to get everything started is ~/bin/dotfiles, and this is my "dotfiles" Git repo.

What, exactly, does the "dotfiles" command do?

It's really not very complicated. When dotfiles is run, it does a few things:

  1. Git is installed if necessary, via APT or Homebrew (which is installed if necessary).
  2. This repo is cloned into the ~/mysrc/dotfiles directory (or updated if it already exists).
  3. Files in init are executed (in alphanumeric order).
  4. Files in copy are copied into ~/.
  5. Files in link are linked into ~/.

Note:

  • The backups folder only gets created when necessary. Any files in ~/ that would have been overwritten by copy or link get backed up there.
  • Files in bin are executable shell scripts (~/mysrc/dotfiles/bin is added into the path).
  • Files in source get sourced whenever a new shell is opened (in alphanumeric order)..
  • Files in conf just sit there. If a config file doesn't need to go in ~/, put it in there.
  • Files in caches are cached files, only used by some scripts. This folder will only be created if necessary.

Installation

OS X

Notes:

  • You need to be an administrator (for sudo).
  • You need to have installed XCode Command Line Tools, which are available as a separate, optional (and much smaller) download from XCode.
bash -c "$(curl -fsSL https://raw.github.com/weisjohn/dotfiles/master/bin/dotfiles)" && source ~/.bashrc

Installation

Using Git and the bootstrap script

You can clone the repository wherever you want. (I like to keep it in ~/Projects/dotfiles, with ~/dotfiles as a symlink.) The bootstrapper script will pull in the latest version and copy the files to your home folder.

git clone https://github.com/weisjohn/dotfiles.git && cd dotfiles && ./bootstrap.sh

To update, cd into your local dotfiles repository and then:

./bootstrap.sh

Alternatively, to update while avoiding the confirmation prompt:

./bootstrap.sh -f

Git-free install

To install these dotfiles without Git:

cd; curl -#L https://github.com/weisjohn/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh}

To update later on, just run that command again.

Add custom commands without creating a new fork

If ~/.extra exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository.

My ~/.extra looks something like this:

# PATH additions
export PATH="~/bin:$PATH"

Sensible OS X defaults

When setting up a new Mac, you may want to set some sensible OS X defaults:

./.osx

Feedback

Suggestions/improvements welcome!

Thanks to…

About

.files, including ~/.osx — sensible hacker defaults for OS X

http://mths.be/dotfiles


Languages

Language:Shell 88.0%Language:Perl 7.1%Language:JavaScript 3.4%Language:CSS 0.9%Language:Less 0.6%