- Have a public repo of dotfiles to share with community.
- Have a private repo of dotfiles for personal configurations.
- Symlinks and gnu stow to link some dotfiles to my home directory. You can install stow with
brew install stow. Here’s a couple articles on stow: Simple article on stow and Stow for more complex things.
- A couple ENV vars for my public and private dotfile setups.
Let’s run stow with options
-n -v to see what it plans to do:
➜ ~/dotfiles/justin808-dotfiles (master u=) ✗ stow -t ~/ -n -v home ✖ ✭ [22:23:28] LINK: .gemrc => dotfiles/justin808-dotfiles/home/.gemrc LINK: .gitignore_global => dotfiles/justin808-dotfiles/home/.gitignore_global LINK: .irbc => dotfiles/justin808-dotfiles/home/.irbc LINK: .pryrc => dotfiles/justin808-dotfiles/home/.pryrc LINK: .tmux.conf => dotfiles/justin808-dotfiles/home/.tmux.conf LINK: .vimrc => dotfiles/justin808-dotfiles/home/.vimrc LINK: .zshrc => dotfiles/justin808-dotfiles/home/.zshrc WARNING: in simulation mode so not modifying filesystem.
Then after running the command again, from the directory above
stow -t ~/ -v home
Here’s a nifty find command to list the symlinks in the home directory:
find ~ -maxdepth 1 -type l | xargs ls -al
Here’s the output:
➜ ~/dotfiles/justin808-dotfiles (master u=) ✗ find ~ -maxdepth 1 -type l | xargs ls -al ✖ ✭ [22:26:14] lrwxr-xr-x 1 justin staff 39 Oct 18 22:25 /Users/justin/.gemrc -> dotfiles/justin808-dotfiles/home/.gemrc lrwxr-xr-x 1 justin staff 50 Oct 18 22:25 /Users/justin/.gitignore_global -> dotfiles/justin808-dotfiles/home/.gitignore_global lrwxr-xr-x 1 justin staff 38 Oct 18 22:25 /Users/justin/.irbc -> dotfiles/justin808-dotfiles/home/.irbc lrwxr-xr-x 1 justin staff 39 Oct 18 22:25 /Users/justin/.pryrc -> dotfiles/justin808-dotfiles/home/.pryrc lrwxr-xr-x 1 justin staff 43 Oct 18 22:25 /Users/justin/.tmux.conf -> dotfiles/justin808-dotfiles/home/.tmux.conf lrwxr-xr-x 1 justin staff 39 Oct 18 22:25 /Users/justin/.vimrc -> dotfiles/justin808-dotfiles/home/.vimrc lrwxr-xr-x 1 justin staff 39 Oct 18 22:25 /Users/justin/.zshrc -> dotfiles/justin808-dotfiles/home/.zshrc