Skip to content

TheLonelyGhost/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thelonelyghost's dotfiles

TODO: insert photo preview of dotfiles

Install

  1. Install [Homebrew][homebrew] (if on MacOS)
  2. Install zsh
  3. Install rcm
  4. Set zsh as your login shell
  5. Clone dotfiles
  6. Sync (restart terminal session and re-sync, if errors)
  7. Restart terminal session

Install Homebrew (MacOS only)

For the most up-to-date docs on how to install homebrew, visit [their homepage][homebrew]. For those too lazy to do that, here's a one-liner that'll probably work for you too.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install ZSH

For MacOS:

$ brew install zsh

For Ubuntu:

$ sudo apt-get install zsh

For Manjaro Linux:

$ pamac install zsh

Install RCM

For MacOS:

$ brew tap thoughtbot/formulae
$ brew install rcm

For Ubuntu:

$ sudo add-apt-repository -y ppa:martin-frost/thoughtbot-rcm
$ sudo apt-get install -y rcm

For Manjaro Linux:

$ pamac install rcm

Set ZSH as your login shell

For MacOS:

$ grep -qFe '/usr/local/bin/zsh' /etc/shells &>/dev/null || echo '/usr/local/bin/zsh' | sudo tee -a /etc/shells 1>/dev/null
$ chsh -s /usr/local/bin/zsh

For Ubuntu:

$ chsh -s "$(command -v zsh)"

For Manjaro:

$ chsh -s "$(command -v zsh)"

Clone dotfiles

$ git clone https://gitlab.com/thelonelyghost/dotfiles.git ~/.dotfiles

(Or, fork and keep your fork updated).

Sync

$ env RCRC="${HOME}/.dotfiles/rcrc" rcup

After the initial installation, you can run rcup without the one-time variable RCRC being set (rcup will symlink the repo's rcrc to ~/.rcrc for future runs of rcup). See example.

This command will create symlinks for config files in your home directory. Setting the RCRC environment variable tells rcup to use standard configuration options:

  • Exclude the README.md and LICENSE files, which are part of the dotfiles repository but do not need to be symlinked in.
  • Give precedence to personal overrides which by default are placed in ~/.dotfiles-local
  • Detect if MacOS or Linux and sync platform-specific files from the relevant tag- directory as well

You can safely run rcup multiple times to update:

$ rcup

You should run rcup after running git pull to finalize any updates, otherwise you risk subsequent shell sessions being broken if files that were previously symlinked in-place are removed by the update. Worst case scenario, no changes to the bash shell are made and you can always set /bin/bash as your shell to recover

Specific Usage

Thanks

Thank you, thoughtbot (and contributors) for initial scaffolding of dotfiles repository.

License

dotfiles is copyright © 2009-2020 thoughtbot and David Alexander. It is free software, and may be redistributed under the terms specified in the LICENSE file.