My command line life
Python Shell Vim script Emacs Lisp Ruby Objective-C Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
emacs.d
ipython
iterm2
mac-alfred workflows/Alfred.alfredpreferences
mac-osx_preferences
sublime
tilde
tmuxinator
vim
.gitignore
.gitmodules
LICENSE
README.md
Rakefile
aliases
brew.csv
cask.csv
dir_colors
dotfiles
eslintrc.yml
gitconfig
hgignore_global
linux-env.zsh.rrc
linux-gitignore
mac-env.zsh.rrc
mac-gitignore
mongorc.js
netrc.rrc
npmrc
tern-config
tmux.conf.rrc
vimrc
windows-env.zsh.rrc
windows-gitignore
zlogin
zpreztorc
zshenv
zshrc

README.md

Adam's Dot Files

These configuration files set up my command line interface.

Environment

I hack on Mac OS X and changes will be necessary for Linux users, however I am currently attempting to make these dotfiles cross-platform. Send me pull requests with any changes in this regard.

Installation

Clone this repository into ~/.dotfiles, change directory into ~/.dotfiles, and execute the rake install task.

####Installation one-liner curl -L https://raw.github.com/adamwalz/dotfiles/master/install.sh | sh

--OR--

(1.) Launch Zsh:

    zsh

(2.) Clone the repository

    git clone git://github.com/adamwalz/dotfiles.git ~/.dotfiles

(3.) Set Zsh as your default shell

    chsh -s /bin/zsh

(4.) Rake install

    cd ~/.dotfiles
    rake install

Rake will never replace existing files but back them up into ~/.dotfiles_backup. The dot files will be symbolically linked into the home directory. Templates will be rendered in place then symbolically linked. Since the Rakefile is currently Mac OS X specific, it must be edited for use with key chains on other operating systems. I welcome pull requests that add support for additional password managers.

Whats included

  • Zsh configurations (zshrc, zpreztorc, zshenv, zlogin)
  • dir_colors for gnu terminal coloring
  • git global configurations (gitconfig, gitignore)
  • pianobar pandora terminal client
  • netrc.rrc for FTP defaults
  • Rakefile to install it all

Usage

Prezto Zsh configuration framework

sorin theme

Zsh configuration is done useing the Prezto framework, originally a fork of oh-my-zsh. Personal styles are changed in zpreztorc

  1. For a list of themes, type prompt -l.
  2. To preview a theme, type prompt -p name.
  3. Load the theme you like in ~/.zpreztorc then open a new Zsh terminal window or tab.

In the sorin theme shown above, the following symbols show vim, git, and working directory status.

Left Prompt

  • prezto — The current working directory.
  • git:master:merge — Git branch and state.
  • ❯❯❯ — Prompt: type after this.

Right Prompt

  • V — Vim command mode indicator.
  • ⏎ — Non-zero return.
  • ✚ — Git added.
  • ⬆ - Git ahead.
  • ⬇ - Git behind.
  • ✖ — Git deleted.
  • ✱ — Git modified.
  • ➜ — Git renamed.
  • ✭ - Git stashed.
  • ═ — Git non-merged.
  • ◼ — Git untracked.

Authentication

Some programs require that authentication information is stored in their respective dot files. Instead of managing two separate dot file repositories, one for actual use and another sanitised for sharing, I store authentication information in the Mac OS X Keychain. In this case, the dot files will be generated from files of the same name that end in the .rrc extension, which are Ruby ERB templates.

The .rrc extension, which stands for raw dot file (runcom), is used instead of .erb to not conflict with non dot file ERB templates.

The .rrc syntax is <%= Keychain['Entry Name'].account %> and <%= Keychain['Entry Name'].password %> respectively. For example, this is a .netrc snippet.

login <%= Keychain['ftp_host'].account %>
password <%= Keychain['ftp_host'].password %>

The disadvantage of this method is that the dot files cannot be installed via SSH because Mac OS X disallows Keychain access.

Terminals

iTerm2.app has mouse support. If you favour in continuing to use Terminal.app, which does not have mouse support under Mac OS X 10.7 Lion, there are hacks available to improve it. Install SIMBL then install under ~/Library/Application Support/SIMBL/Plugins the following plugins.

Feedback

Suggestions/improvements welcome!

Thanks to…