GithubHelp home page GithubHelp logo

huanqi / dotfiles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weisjohn/dotfiles

0.0 2.0 0.0 224 KB

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

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

Shell 78.39% CSS 1.60% Perl 12.14% JavaScript 7.87%

dotfiles's Introduction

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…

dotfiles's People

Contributors

mathiasbynens avatar weisjohn avatar matijs avatar paulirish avatar pkruithof avatar richo avatar nikolavp avatar kyleridolfo avatar iloveitaly avatar ekinertac avatar franciscolourenco avatar wimleers avatar atdt avatar jrk avatar jessejlt avatar jpsirois avatar gburtini avatar dmiedema avatar danawoodman avatar clee avatar keyboardcowboy avatar alex-humphreys avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.