Skip to content

sohkai/.dotfiles

Repository files navigation

OSX configuration files

Just cd ~ && git clone [email protected]:sohkai/.dotfiles.git --recurse-submodules && ~/.dotfiles/install.sh.

At the end, you'll still need to do some things by hand to complete the install. This includes things such as:

  • Uploading your git SSH key to Github
  • Setting up a git signing key in ~/.gitconfig
  • Setting up a homebrew's git token (HOMEBREW_GITHUB_API_TOKEN) in your resulting ~/.profile_env.
  • Adding any other local configuration (e.g. aliases, paths, etc) to your resulting ~/.bashrc, ~/.zshrc, ~/.profile_env, ~/.language_ver, etc.

Make sure to pay attention to the messages at the end for further instructions.

NOTES:

  • This repo does not need to be cloned in a particular directory (it'll set up a $DOTFILES environment variable during installation), but I like to use ~/.dotfiles/ and all example paths here will assume you also choose this location
  • install.sh is most useful on OSX (due to most things being installed with brew for now)
  • On OSX, you should probably install Xcode, or at least the Xcode CLI tools (xcode-select --install), before running install.sh

install.sh

What's included (everything with a .local suffix is copied to ~/ without the suffix):

  • Setting up homebrew, Cask, and then a whole bunch of goodies
  • Languages:
  • Bash profile and inputrc
  • Zsh and Zim profile
  • Tmux
  • vimrc
  • git (and Github SSH key)
  • mercurial
  • And lots more

Shell Structure

The locally installed shell files will ultimately refer back to the configuration files in this directory.

For bash, the general source order is:

  1. ~/.bash_profile (loaded by bash on login; always on OSX)
  2. ~/.bashrc
    • ~/.init_env
    • ~/.dotfiles/bash.d/bashrc
      • ~/.dotfiles/profile.d/*.sh
      • ~/.dotfiles/bash.d/*.sh
      • ~/.dotfiles/profile.d/after*.sh
    • ~/.profilerc
    • ~/.languagerc

For zsh, the general source order is:

  1. ~/.zshenv (loaded by zsh)
    • ~/.init_env
  2. ~/.zlogin (loaded by zsh on login; always on OSX)
  3. ~/.zshrc
    • ~/.dotfiles/zsh.d/zshrc
      • ~/.zimrc
      • ~/.dotfiles/zsh.d/zimrc
      • ~/.dotfiles/zsh.d/zplugrc
      • ~/.dotfiles/profile.d/*.sh
      • ~/.dotfiles/zsh.d/*.zsh
      • ~/.dotfiles/profile.d/after*.sh
    • ~/.profilerc
    • ~/.languagerc

Bash and zsh both source their paths, environment settings, aliases, functions, and other configuration details from the *.sh or *.zsh files found in the shared profile.d/ folder as well as their own respective folder. The profile.d/ files are loaded first before any corresponding bash.d/ or zsh.d/ files are loaded; this allows the files in bash.d/ or zsh.d/ to override any inherited setting from profile.d/. Files in profile.d/after/, bash.d/after/, and zsh.d/after/ are run after all other files in profile.d, bash.d, and zsh. are sourced and can be used to reset non-local settings (e.g. an alias set by a sourced plugin).

NOTE: After installation, the .profilerc and .languagerc files do not link to a corresponding file in this repo; as such, they should contain only local configuration. Specifically, the .profilerc file should be used for general environment settings (e.g. local aliases, environments, etc) and .languagerc should specify defaults for any loaded language version managers. Due to the slow speed of some version managers (ahem nvm ahem), .languagerc is only loaded at startup if confirmed.

Changes

In general, keep local configurations to one of the local files. Only modify the files in this repo when you know you would like to also propagate that change to all environments.

For the most part, if you do make a change to a file in this repo, you will be able to propagate that change by resourcing the corresponding local configuration file. However, there are a few configuration files that are not able to be loaded from another file or are designed to only be locally placed; changes to these files will only come into effect if they are made locally and will have to be duplicated into this repo. A list of files to be wary of when changing:

About

Gotta get my configs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published