Git Product home page Git Product logo

.dotfiles's Introduction

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:

.dotfiles's People

Contributors

0xgabi avatar sohkai avatar

Watchers

 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.