dotfiles

My personal dotfiles

Stars
2

Chris' dotfiles

Installation

Description

These are my dotfiles. Use at your own risk.

These are primarily used on Mac OS systems, but might be able to be used on Linux as well.

Features

Mac OS Specifics

These dotfiles allow the following Mac OS specific dotfiles to be sourced after all other supported dotfiles:

  1. .path.macos
  2. .env.macos
  3. .alias.macos
  4. .functions.macos

Work Specific dotfiles

This repository allows the creation and use of work-specific dotfiles. Everything is contained under the $DOTFILES_DIR/work/ directory (which is ignored by this repository). This allows for the two repositories to be maintained individually.

Similar to the structure of this repository, we allow for the following folders:

  1. $DOTFILES_DIR/work/README.md
  2. $DOTFILES_DIR/work/git
  3. $DOTFILES_DIR/work/system

Work dotfiles Initialization

To initialize the dotfiles that can be used in these directories, you can simply run:

source ~/dotfiles/bin/create_work_dotfiles.sh

Nuances

The below files will be preferred over the ones contained within this repository.

  1. $DOTFILES_DIR/work/git/.gitconfig
  2. $DOTFILES_DIR/work/git/.gitignore_global

Banners

How does the banner work?

The banners file(s) need to set the variable BANNER_OUTPUT.

Upon sourcing all of the .banner files, this variable is printed via:

printf "$BANNER_OUTPUT"
Banner dotfiles Sourcing Hierarchy
  1. $DOTFILES_DIR/system/.banner
  2. $DOTFILES_DIR/system/.banner_*
  3. $DOTFILES_DIR/work/system/.banner
  4. $DOTFILES_DIR/work/system/.banner
Why did I chose to have the banner work this way?

Very simply, because I wanted a different banner for my work environment than my personal. The current implementation allows this in a fairly trivial manner.

The dotfiles command

$ dotfiles help
Usage: dotfiles <command>

Commands:
   clean            Clean up caches (brew)
   dock             Apply macOS Dock settings
   edit             Open dotfiles in IDE (code) and Git GUI (stree)
   help             This help message
   macos            Apply macOS system defaults
   update           Update packages and pkg managers (OS, brew, npm, gem)

Additional resources

Credits

I borrowed (and tweaked) a fair bit from:

Additionally, the dotfiles community happens to have a TON of great examples of other peoples dotfiles.