Git Product home page Git Product logo

dotfiles's Introduction

Dotfiles

My OSX / Manjaro dotfiles.

About this project

Forked and heavily stolen from Cowboy's dotfiles. Modified to be a bit simpler and prefer Manjaro/Zsh/Oh-my-zsh. If you want your own version, you should definitely fork cowboy's version and not mine - his is much cleaner and mine strips a lot of this away.

How the "dotfiles" command works

When dotfiles is run for the first time, it does a few things:

  1. In Manjaro, Git is installed if necessary via pacman (it's already there in OSX).
  2. This repo is cloned into your user directory, under ~/.dotfiles.
  3. Files in /copy are copied into ~/. (read more)
  4. You are prompted to choose scripts in /init to be executed. The installer attempts to only select relevant scripts, based on the detected OS and the script filename.
  5. Your chosen init scripts are executed (in alphanumeric order, hence the funky names). (read more)
  6. Files in /link are symlinked into ~/. (read more)

On subsequent runs, step 1 is skipped, step 2 just updates the already-existing repo, and step 4 remembers what you selected the last time. The other steps are the same.

Other subdirectories

  • The /backups directory gets created when necessary. Any files in ~/ that would have been overwritten by files in /copy or /link get backed up there.
  • The /bin directory contains executable shell scripts (including the dotfiles script) and symlinks to executable shell scripts. This directory is added to the path.
  • The /caches directory contains cached files, used by some scripts or functions.
  • The /conf directory just exists. If a config file doesn't need to go in ~/, reference it from the /conf directory.
  • The /source directory contains files that are sourced whenever a new shell is opened (in alphanumeric order, hence the funky names).
  • The /test directory contains unit tests for especially complicated bash functions.

The "copy" step

Any file in the /copy subdirectory will be copied into ~/. Any file that needs to be modified with personal information (like copy/.gitconfig which contains an email address and private key) should be copied into ~/. Because the file you'll be editing is no longer in ~/.dotfiles, it's less likely to be accidentally committed into your public dotfiles repo.

The "init" step

Scripts in the /init subdirectory will be executed. A whole bunch of things will be installed, but only if they aren't already.

The "link" step

Any file in the /link subdirectory gets symlinked into ~/ with ln -s. Edit one or the other, and you change the file in both places. Don't link files containing sensitive data, or you might accidentally commit that data! If you're linking a directory that might contain sensitive data (like ~/.ssh) add the sensitive files to your .gitignore file!

OS X

Manjaro

Both

Scripts

In addition to the aforementioned dotfiles script, there are a few other bin scripts.

  • dotfiles - (re)initialize dotfiles. It might ask for your password (for sudo).
  • src - (re)source all files in /source directory
  • Look through the bin subdirectory for a few more.

License

Copyright (c) 2014 "Cowboy" Ben Alman
Licensed under the MIT license.
http://benalman.com/about/license/

dotfiles's People

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.