Skip to content

evanchiu/dotfiles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

My shell configuration files.

Why is this a git repo?

To keep track of these files. My dotfiles are based very heavily on Cowboy's dotfiles.

That command is 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 ~/.dotfiles directory (or updated if it already exists).
  3. Files in init are executed (in alphanumeric order, hence the "50_" names).
  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 (Eg. ~/.dotfiles/bin is added into the path).
  • Files in source get sourced whenever a new shell is opened (in alphanumeric order, hence the "50_" names).
  • 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 XCode Command Line Tools or a full installation of XCode. Running git on the command line triggers OS X to offer an automatic install of XCode Command Line Tools.

Ubuntu Notes

  • You need to be an administrator (for sudo).

Actual Installation

bash -c "$(curl -fsSL https://raw.githubusercontent.com/evanchiu/dotfiles/master/bin/dotfiles)" && source ~/.zshrc

The ~/ "copy" step

Any file in the copy subdirectory will be copied into ~/. Any file that needs to be modified with personal information (like .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 ~/ "link" step

Any file in the link subdirectory gets symbolically linked with ln -s into ~/. Edit these, and you change the file in the repo. Don't link files containing sensitive data, or you might accidentally commit that data!

Scripts

In addition to the aforementioned dotfiles script, there are a few other scripts. This includes ack, which is a git submodule.

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

Inspiration

https://github.com/cowboy/dotfiles

License

Copyright (c) 2018 Evan Chiu

Licensed under the MIT license

About

My OS X / Ubuntu dotfiles.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 55.6%
  • Lua 10.9%
  • Python 10.3%
  • Ruby 9.5%
  • JavaScript 7.0%
  • Vim Script 5.0%
  • Other 1.7%