Obsessive Compulsive Directory

Set up a new Linux system just the way you like it, in seconds.

This is loosely based on a similar approach I read years ago by Rob Flickenger.

I got tired of having my common dotfiles (.bashrc, .pythonrc, .vimrc, etc.) out of sync across all the different workstations and shells I use on a regular basis. So, I rewrote them in a way to be generic, allowing host-specific and domain-specific files to be sourced as appropriate.  I also included window-manager specifics, like my Openbox configuration.

Now I can take a freshly installed operating system and make it cozy and customized without any tedious work. I also get the added benefit of source control to view previous versions of files.

If you want to steal all of it for yourself, just do this:
which git || sudo apt-get install git-core
git clone git://github.com/obeyeater/ocd.git ~/.ocd
cd ~/.ocd
ls -a

Have a look at what's there. If you want to "install" these files, do this:
./update
Here are some of the files that will install in your home directory:
.pythonrc.py
.screenrc
.agentrc
.bashrc
.pydistutils.cfg
.bash_prompts
.vimrc
.bash_logout
.vim/py.vim
.config/openbox
.config/openbox/rc.xml
.config/openbox/menu.xml
.config/openbox/autostart.sh
You can browse all of these here.

The update script (see ./update above) is just a simple bash script to copy things over. It backs up your existing stuff, but naturally you should read over the code and understand what it's doing before you run it.

I wouldn't recommend using my personal git repository indefinitely. I'd highly recommend setting up your own Git repo if you intend to use this regularly. It's easy enough to make your own copy of these files in your own repository and adjust them as you see fit... not to mention tracking and syncing changes across all the workstations that you use. (I'd love to hear tips you come up with from doing this yourself!)

When I change something tracked in my ~/.ocd directory, I just do a ./downdate and then git push back to the main repository. Then I can grab the changes from any of my other machines, something like this:

eater@yourmoms(1):~/.ocd:
$ git pull
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
From git@github.com:obeyeater/ocd
09ec337..ba21282 master -> origin/master
Updating 09ec337..ba21282
[Files omitted]

eater@yourmoms(2):~/.ocd:
$ ./update
Old files saved in '/home/eater/.ocd_backup.tar.gz'.
.................. All Done!
Comments