i manage mine with GNU Stow, a free, portable, lightweight symlink farm manager. this allows me to keep a versioned directory of all my config files that are virtually linked into place via a single command. this makes sharing these files among many users (root) and computers super simple. and does not clutter your home directory with version control files.
stow is available for all linux and most other unix like distributions via your package manager.
sudo pacman -S stow
sudo apt-get install stow
brew install stow
or clone it from source and build it yourself.
by default the stow command will create symlinks for files in the parent directory of where you execute the command. so my dotfiles setup assumes this repo is located in the root of your home directory ~/dotfiles
. and all stow commands should be executed in that directory. otherwise you’ll need to use the -d
flag with the repo directory location.
to install most of my configs you execute the stow command with the folder name as the only argument.
to install my i3 config use the command:
stow i3
this will symlink files to ~/.i3
and possibly other places.
but you can override the default behavior and symlink files to another location with the `-t` (target) argument flag.
to install my pacman config you need to execute the command:
stow -t / pacman
this will symlink the config file to `/etc/pacman.conf`.
**note:** stow can only create a symlink if a config file does not already exist. if a default file was created upon program installation you must delete it first before you can install a new one with stow. this does not apply to directories, only files.
#tl;dr navigate to your home directory
cd ~
clone the repo:
git clone https://github.com/jeroentbt/dotfiles.git
enter the dotfiles directory
cd dotfiles
install the bash settings
stow bash
install bash settings for the root user
sudo stow bash -t /root
install i3 config
stow i3
uninstall i3 config
stow -D i3
install ncmpcpp
stow ncmpcpp
etc, etc, etc…