Difference between revisions of "Libetc"
(remove language suffix from Category:Dotfiles (English), see Talk:Table of Contents#English Category Names: Capitalization and Conflict with i18n)
(Linked the libetc package to the AUR page for it.)
|Line 9:||Line 9:|
libetc is available in the [[AUR]], so use your favorite method to install it.
libetcis available in the [[AUR]], so use your favorite method to install it.
Revision as of 17:40, 23 December 2013
This is for those who are tired of having a messy $HOME folder cluttered with loads of dotfiles/dotfolders.
libetc is a LD_PRELOAD-able shared library that intercepts file operations: if a program tries to open a dotfile in $HOME, it is redirected to $XDG_CONFIG_HOME, as defined by freedesktop.
When an application tries to acces $HOME/.foobar, the call is redirected to XDG_CONFIG_HOME/foobar
AUR, so use your favorite method to install it.AUR is available in the
I use bash, but this should work for other shells too.
Open ~/.bashrc and add :
export XDG_CONFIG_HOME=/anywhere/you/want export LD_PRELOAD=libetc.so.0 export LIBETC_BLACKLIST=/bin/cp:/bin/ln:/bin/ls:/bin/mv:/bin/rm:/usr/bin/find
XDG_CONFIG_HOME defaults to ~/.config if unset. Applications in LIBETC_BLACKLIST will access dotfiles the regular way.
At that point, you might want to have every dotfile/dotfolder that was previously in your $HOME in $XDG_CONFIG_HOME and strip out the dot in their name. If you don't, new files will be created in $XDG_CONFIG_HOME and/or "File not found" errors will appear. Read "Exceptions" below.
Then source your .bashrc :
Those files need to be in your $HOME, but you can link them into $XDG_CONFIG_HOME if you need to.
(feel free to add more if you find some)
Be sure to read the README there : http://ordiluc.net/fs/libetc