To install, in terminal navigate to your home folder and run git clone http://github.com/twe4ked/dotfiles.git .dotfiles
to pull down these files.
Next, open your ~/.profile
in a text editor and add the following at the bottom. If you don’t have a ~/.profile
simply create one and it will automatically be run by terminal.app when each time you run it.
# Contents of ~/.profile
if [ -e ~/.dotfiles ]; then
. ~/.dotfiles/config
fi
Setup symlinks for .irbrc ln -s ~/.dotfiles/lib/irbrc .irbrc # Setup .irbrc symlink
(command must be run from your home folder)
zsh specific
Install oh-my-zsh wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
Setup symlinks for my.zsh-theme:
ln -s ~/.dotfiles/zsh/zsh-theme my.zsh-theme # Setup my.zsh-theme symlink (command must be run from ~/.oh-my-zsh/themes)
Remove ~/.zshrc
and replace with a symlink to the custom version:
ln -s ~/.dotfiles/zsh/zshrc .zshrc # Setup .zshrc symlink (command must be run from ~/)
oh-my-zsh is a community-driven framework for managing your zsh configuration.
- Custom functions
- Hints file
- Bash and zsh compatible
- Great looking and very helpful prompt
- Git stashes
- Git Branch
- Git status
- RVM info
- Time
- Custom current working directory shortener [bjeanes]
- Only show user@hostname when needed
- Battery level indicator
This file loads the rest of the config and also acts as a place to put major items.
- Search /Sites folder on ‘cd’ command
- Set textmate as default editor
- Make git colourful
- Sets title of window to be user@host
- .irbrc to make irb awesome (view framework/syntax highlighting/tab-completions/pretty-print/auto tab indentation).
- Sources MOTD
- Prints current shell
- Shows random hint
What you have to look at all day.
[~/.dotfiles (git-branch)] » user@hostname
(bash)
[~/.dotfiles] » user@hostname
(zsh) (rvm) ± (master*) 1+ [19:30] ⚡
The ⚡ symbol changes colour based on battery levels.
1+ is the number of git stashes
user@hostname only displays when user = root or connected over ssh
dotfiles/aliases/aliases
- ‘et’ = Open current folder with textmate
- ‘eprof’ = Edit these files
- ‘reload’/‘sprof’ = Reload these files
- ‘pubkey’ = Copy pub keys to clipboard
- ‘gi’ = Gem install with sudo at the front and without including ri and rdoc
- ‘show_hidden’ = Show hidden files in Finder
- ‘hide_hidden’ = Hide hidden files in Finder
- ‘o.’ = Open the current directory
- ‘hints’ = Show hints
- ‘tmbundles’ = Go to textmate bundles folder
dotfiles/aliases/rails
# Rails stuff
alias logs='tail -f -0 ./log/*.log'
alias migrate='rake db:migrate'
alias rollback='rake db:rollback'
alias r='rake'
# Rails 3 aliases with backwards compatibility
alias ss="[ -e script/server ] && script/server || rails server"
alias sc="[ -e script/console ] && script/console || rails console"
# Generate aliases
alias model="[ -e script/generate ] && script/generate model || rails generate model"
alias controller="[ -e script/generate ] && script/generate controller || rails generate controller"
alias migration="[ -e script/generate ] && script/generate migration || rails generate migration"
dotfiles/aliases/git
alias gst='git status'
alias gl='git pull --rebase'
alias gp='git push'
alias ga='git add'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gbc='git branch --color'
alias gba='git branch -a'
alias gco='git checkout'
alias gdc='git-svn dcommit'
alias gk='gitk --all &'
alias gitlog='git log --oneline --decorate --graph'
# Push to Heroku
alias gph='gp heroku'
# Show git config
alias gitconfig='cat .git/config'
# Edit git config
alias egitconfig='mate .git/config'
# Alias for opening GitX
alias gitx="open -b nl.frim.GitX"
m path/to/project
If no arguments are supplied open the current folder with TextMate
o path/to/project
Use ‘o’ instead of ‘open’ (o ~/Sites will open the sites folder), if no arguments are supplied open the current folder,
rp
looks for a tmp directory, if there is no tmp directory it prompts you to create one, once it finds a tmp directory it touches tmp/restart.txt to tell passenger to restart.
There is a random hint taken from lib/hints.txt inserted into the motd each time it is run. You can show all hints by running the following alias:
alias hints='cat ~/.dotfiles/lib/hints.txt' # Show hints
- Ignore case in auto complete
- Removes the bell
- Automatically show completion without double tab-ing
To use supply a minumum of two arguments; username, repository name
Supply a third argument to specify what folder you want to project to be cloned into
git clone http://github.com/[argument 1]/[argument 2] [argument 3]
github twe4ked dotfiles .dotfiles
- HIRB – A mini view framework for console/irb. Console goodies include a no-wrap table, auto-pager, tree and menu.
- Wirble – IRB syntax highlighting
- oh-my-zsh is a community-driven framework for managing your zsh configuration.
Based on work by bjeanes
- Only load battery.py on macbook