chimpyw /.zshrc

export HISTFILE=~/.histfile
export HISTSIZE=1000
export SAVEHIST=1000
export EDITOR="vim"
export BROWSER="firefox"
export MPD_HOST="localhost"
export MPD_PORT="6600"
export SDL_AUDIODRIVER="alsa"
export MOZ_DISABLE_PANGO=1
export PATH=$PATH:/home/andrew/.bin

eval `dircolors -b ~/.dircolours`

setopt   notify globdots correct pushdtohome cdablevars autolist
setopt   correctall autocd recexact longlistjobs
setopt   autoresume histignoredups pushdsilent 
setopt   autopushd pushdminus extendedglob rcquotes mailwarning
unsetopt bgnice autoparamslash

bindkey -v

zstyle :compinstall filename '/home/andrew/.zshrc'

autoload -Uz compinit
compinit

alias go="clear && startx"
alias ls="ls --color=auto -hF"
alias ll="ls -l"
alias la="ls -a"
alias lla="ls -la"
alias l="ls -CF"
alias mv="mv -v --backup=existing"
alias cp="cp -v"
alias rm="rm -v"
alias :q="exit"
alias vi="vim"
alias dfh="df -h"
alias duh="du -h"
alias grep="grep -n --color=auto"
alias screen="cd && screen -RAD"
alias chmodrd="find . -type d -exec chmod 755 {} \;"
alias chmodrf="find . -type f -exec chmod 644 {} \;"
alias mntext="sudo mount /media/external"
alias umntext="sudo umount /media/external"
alias update="sudo pacman -Syu --noconfirm"
alias dssh="ssh -i ~/.ssh/id -p 37546 andrew@digssrv"
alias dscp="scp -i ~/.ssh/id -P 37546 -o 'User  andrew'"
alias playlist="mplayer -playlist ~/documents/playlist.txt"
alias mt="mpc toggle"
alias shutdown="sudo shutdown -h now"
alias reboot="sudo reboot"
alias alsaswitch="sudo alsaswitch"
alias lgrep="ll | grep -i"

# allow approximate
zstyle ':completion:*' completer _complete _match _approximate
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric

# tab completion for PID :D
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:kill:*' force-list always

# cd not select parent dir. 
zstyle ':completion:*:cd:*' ignore-parents parent pwd

zstyle ':completion:*:functions' ignored-patterns '_*'
zstyle ':completion::complete:*' use-cache 1

compctl -g '~/.mame/roms/*(:t:r)' sdlmame
compctl -k '(usb onboard)' alsaswitch

bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line
bindkey "^[[3~" delete-char

bindkey "^?" backward-delete-char
bindkey '^[OH' beginning-of-line
bindkey '^[OF' end-of-line
bindkey '^[[5~' up-line-or-history
bindkey '^[[6~' down-line-or-history
bindkey "^r" history-incremental-search-backward
bindkey ' ' magic-space    # also do history expansion on space
bindkey '^I' complete-word # complete on tab, leave expansion to _expand

PS1=$'%{\e[0;37m%}%n%{\e[1;32m%}@%{\e[0;32m%}%m %{\e[0;30m%}%3~ %{\e[0;37m%}> %{\e[0m%}'