Difference between revisions of "Dotfiles"

From Noah.org
Jump to navigationJump to search
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:Engineering]]
 
[[Category:Engineering]]
 +
All of my dotfiles are as universal as possible so they usually work on Linux, BSD, and Solaris. All of my systems use exactly the same dotfiles so I can easily move my home environment. Some of the universal dotfiles will source local dotfiles so you can customize individual systems. For example, the universal .bashrc sources .bashrc_local. The dotfiles sync script described below will not update the local variants. In most cases I find I never need any local tweaks with the exception of Mutt -- obviously the universal muttrc needs to source muttrc_local.
  
== my dotfiles ==
+
== .dotfiles sync script ==
  
I keep all of my beloved UNIX dotfiles online here:
+
I have a shell script that I run periodically to get the latest versions of my dotfiles.
  
     [http://www.noah.org/engineering/dotfiles/ dotfiles]
+
     [http://www.noah.org/engineering/dotfiles/.dotfiles .dotfiles]
  
Some of the more interesting dotfiles to me are:
+
The first thing I do on a new system is get the .dotfiles script and then run it to sync all the other dotfiles. In the examples below you don't have to `cd ~` if you prefer to download the dotfiles into some other directory.
  
* .bashrc
+
'''Running the following commands will erase your current home dotfiles (.bashrc and friends).'''
* .bashrc_aliases
 
* .vimrc
 
* .mutt
 
  
I tried to get all of the bash dot files to work on both
+
<pre>
Linux and BSD, with Linux being favored. I don't like my
+
cd ~
dotfiles to depend too much on the platform I'm running on.
+
wget http://www.noah.org/engineering/dotfiles/.dotfiles && chmod 755 .dotfiles
This doesn't always work too well with older BSD systems.
+
./.dotfiles
 +
</pre>
  
== .dotfiles sync script ==
+
If you prefer curl use this:
 +
 
 +
<pre>
 +
cd ~
 +
curl -o .dotfiles http://www.noah.org/engineering/dotfiles/.dotfiles && chmod 755 .dotfiles
 +
./.dotfiles
 +
</pre>
  
I have a shell script that I can run to periodically pull down the latest versions and update my home directory:
+
The .dotfiles sync script never updates the .bashrc_local or muttrc_local or other *_local files.
  
    [http://www.noah.org/engineering/dotfiles/.dotfiles .dotfiles]
+
I considered using something like Subversion to store these dotfiles, but I found this little script to be simpler and quicker for my needs. Plus tar, gzip, and either wget or curl are always available whereas I usually have to install Subversion on a new system.
  
The first thing I do on a new system is grab the .dotfiles script and then run it to download and sync all the other dotfiles. You have to chmod 755 the script to run it.
+
== my dotfiles ==
  
<pre>
+
I keep all of my beloved UNIX dotfiles in an gzip archive here:
# wget http://www.noah.org/engineering/dotfiles/.dotfiles
 
# chmod 755 .dotfiles
 
# ./.dotfiles
 
</pre>
 
  
The strategy that I use is to have all of my systems use exactly the same dotfiles. Of course, I want some options to be unique to each local machine. To handle this I have each dotfile include a local version that is not updated by the dotfiles sync script. For example, the .bashrc file includes .bashrc_local.
+
  [http://www.noah.org/engineering/dotfiles/dotfiles.tar.gz dotfiles.tar.gz]
  
I considered using something like SVN to store these dot files, but I found this little script simpler and quicker for my needs.
+
You can browse the individual dotfiles here:
  
== more dotfiles ==
+
  [http://www.noah.org/engineering/dotfiles/.bashrc .bashrc]
 +
  [http://www.noah.org/engineering/dotfiles/.bash_aliases .bash_aliases]
 +
  [http://www.noah.org/engineering/dotfiles/.vim/ .vim/]
 +
  [http://www.noah.org/engineering/dotfiles/.vimrc .vimrc]
 +
  [http://www.noah.org/engineering/dotfiles/.inputrc .inputrc]
 +
  [http://www.noah.org/engineering/dotfiles/.lynxrc .lynxrc]
 +
  [http://www.noah.org/engineering/dotfiles/.mailcap .mailcap]
 +
  [http://www.noah.org/engineering/dotfiles/.pythonrc .pythonrc]
 +
  [http://www.noah.org/engineering/dotfiles/.screenrc .screenrc]
 +
  [http://www.noah.org/engineering/dotfiles/bin/ bin/]
 +
  [http://www.noah.org/engineering/dotfiles/.fonts/ .fonts/]
 +
  [http://www.noah.org/engineering/dotfiles/.mutt/ .mutt/]
 +
  [http://www.noah.org/engineering/dotfiles/.subversion/ .subversion/]
  
[http://www.dotfiles.com/ www.dotfiles.com] has lots of dotfiles. Lots!
+
I try to get all of the bash dotfiles to work on both Linux and BSD, with Linux being favored. I don't like my dotfiles to depend too much on the platform I'm running on, but this doesn't always work too well with older BSD systems. It's harmless when it fails -- sometimes I get warnings when I login on really old BSD systems.

Latest revision as of 20:00, 11 November 2008

All of my dotfiles are as universal as possible so they usually work on Linux, BSD, and Solaris. All of my systems use exactly the same dotfiles so I can easily move my home environment. Some of the universal dotfiles will source local dotfiles so you can customize individual systems. For example, the universal .bashrc sources .bashrc_local. The dotfiles sync script described below will not update the local variants. In most cases I find I never need any local tweaks with the exception of Mutt -- obviously the universal muttrc needs to source muttrc_local.

.dotfiles sync script

I have a shell script that I run periodically to get the latest versions of my dotfiles.

   .dotfiles

The first thing I do on a new system is get the .dotfiles script and then run it to sync all the other dotfiles. In the examples below you don't have to `cd ~` if you prefer to download the dotfiles into some other directory.

Running the following commands will erase your current home dotfiles (.bashrc and friends).

cd ~
wget http://www.noah.org/engineering/dotfiles/.dotfiles && chmod 755 .dotfiles
./.dotfiles

If you prefer curl use this:

cd ~
curl -o .dotfiles http://www.noah.org/engineering/dotfiles/.dotfiles && chmod 755 .dotfiles
./.dotfiles

The .dotfiles sync script never updates the .bashrc_local or muttrc_local or other *_local files.

I considered using something like Subversion to store these dotfiles, but I found this little script to be simpler and quicker for my needs. Plus tar, gzip, and either wget or curl are always available whereas I usually have to install Subversion on a new system.

my dotfiles

I keep all of my beloved UNIX dotfiles in an gzip archive here:

 dotfiles.tar.gz

You can browse the individual dotfiles here:

 .bashrc
 .bash_aliases
 .vim/
 .vimrc
 .inputrc
 .lynxrc
 .mailcap
 .pythonrc
 .screenrc
 bin/
 .fonts/
 .mutt/
 .subversion/

I try to get all of the bash dotfiles to work on both Linux and BSD, with Linux being favored. I don't like my dotfiles to depend too much on the platform I'm running on, but this doesn't always work too well with older BSD systems. It's harmless when it fails -- sometimes I get warnings when I login on really old BSD systems.