John Piasetzki's Blog

My Thoughts

Next Level Dotfile Management With Libetc

I’ve previously written up my method for managing dotfiles with a git repo and hooks (Git dotfiles without the bloat). I recently found out about libetc which is awesome! It reroute any request to ~/.anything to ~/folder/anything

To get started you’ll need to install libetc. For me it was a simple pacman -S libetc and then add

”.*rc”
1
2
3
export XDG_CONFIG_HOME=~/.dotfiles
export LD_PRELOAD=libetc.so.0
export LIBETC_BLACKLIST=/bin/cp:/bin/ln:/bin/ls:/bin/rm:/usr/bin/find

to .xinitrc and .bashrc (or .zshrc in my case).

1
mkdir .dotfiles && mv .* .dotfiles && cp .dotfiles/bashrc .bashrc && cp .dotfiles/xinitrc .xinitrc

and a reboot and you should be go to go with a nice clean home directory.