Skip to content

Latest commit

 

History

History
78 lines (48 loc) · 4.01 KB

README.md

File metadata and controls

78 lines (48 loc) · 4.01 KB

Dot Files

These configuration files set up my command line interface.

Environment

Be aware that I use Mac OS X; changes will be necessary for Linux users.

To switch to Zsh, execute:

chsh -s /bin/zsh

I store scripts in ~/.tilde/bin. PATH and MANPATH must be modified in oh-my-zsh/environment.zsh to match your configuration.

Some scripts and programs may have different names or extensions depending on the operating system or package manager. Check aliases in oh-my-zsh/alias.zsh to fix them, if necessary.

oh-my-zsh Theme

sorin.oh-my-zsh theme

The font in the screenshot is Monaco 12 pt—the default fixed-width font on Mac OS X prior to Snow Leopard—which has been replaced by Menlo, based on DejaVu Sans Serif Mono, an inferior font. Change the font to Monaco; otherwise, the indicators described bellow will look terrible.

The colours in the image above are from the IR_BLACK scheme.

Left Prompt

  • oh-my-zsh — The current working directory.
  • git:master — Git branch.
  • ❯ — Type after this.

Right Prompt

  • ❮❮❮ — Vi 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, 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 the GitHub API Token snippet from gitconfig.rrc.

[github]
    user = <%= Keychain['GitHub API'].account %>
    token = <%= Keychain['GitHub API'].password %>

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

Installation

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

git clone git://github.com/sorin-ionescu/dotfiles.git ~/.dotfiles
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 Mac OS X specific, it must be edited for use with key chains on other operating systems. I will welcome patches that add support for additional password managers.

Vim Text Editor

I use MacVim with Vundle, which allows for Vim plugins to be installed self-contained under their own directory in vim/bundle making them easy to install and remove. The Rakefile has tasks for managing Vim bundles. Read the Vundle documentation for further information.

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.