My personal dotfiles. dot.kyap.me
dotfiles
README.md

iKevinY/dotfiles #

This repository contains my dotfiles, heavily inspired by @mathiasbynens, @cowboy, and @holman.

Installation #

Warning: You probably don't want to run this command unless you are me. The dotfiles script clones this repository into ~/.dotfiles, and it could be broken at point in time.

bash -c "$(curl -fsSL http://git.io/iKevinY-dotfiles-script)" && source ~/.bashrc

bin/dotfiles #

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

  1. Git is installed if necessary.
  2. This repo is cloned into your user directory, under ~/.dotfiles.
  3. Files in /copy are copied into ~/. (read more)
  4. Files in /link are symlinked into ~/. (read more)

On subsequent runs, step 1 is skipped, and step 2 updates the already-existing repo.

Brewfile #

Calling brew bundle from the root of this repository will install all the dependencies in that file.

/copy #

Any file in the /copy subdirectory will be copied into ~/. Any file that needs to be modified with personal information (like anything containing 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. Files such as .hushlogin which never need to be edited can also be placed in this directory.

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!

/scripts #

Scripts in the /scripts subdirectory can be executed manually.

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).
  • The /vendor directory contains third-party libraries.

Aliases and Functions #

To keep things easy, the ~/.bashrc and ~/.bash_profile files are extremely simple, and should never need to be modified. Instead, add your aliases, functions, settings, etc. into one of the files in the source subdirectory, or add a new file. They're all automatically sourced when a new shell is opened.

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

Extended Configuration #

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. This file can also be used to override settings, functions and aliases from the dotfiles repository.

License #

iKevinY/dotfiles is licensed under the MIT license.