# .bashrc
# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi
autoload -U compinit
compinit

alias q="xmms -e"
alias s="ls" l="ls -l" lses="less" e="less" p="ps aux|grep"
alias z='zless'
alias wgrep='eesh -ewait client_list |grep'
alias f="df -h . |awk '{print \$4}'|tail -1"
alias c=./configure
alias ee='gliv -F'
alias a='./autogen.sh'
alias n=notify
alias gimp='gimp-remote -n'
alias cp-a='cp -a'
alias mv-vi='mv -vi'
alias as='apt-cache search'
alias m=make
alias mi='su -c "make install"'
#alias mplayer='mplayer -vo x11 -vop scale -zoom'
function ag() { su -c "apt-get install $1"; }
alias sp='apt-cache showpkg'
#alias top='xttitle top; top; cd .'
#export PS1="[\w]\\$ "
export PS1='[%~]%# '
export EDITOR=emacs
#export EMAIL=hex@freezone.co.uk
TTY=`tty`
if [ "$DISPLAY" != "" ] ; then
update_title() { echo -ne "\e]2;${*:-$PWD} [${TTY}] \07" |sed -e "s#$HOME#~#;s#\[/dev/\(pts\)#\[\\1#" >/dev/tty; }
function cd() { builtin cd "$@"; update_title; }
update_title
function notify() { update_title "$*"; "$@"; update_title; }
NOTIFY="top less zless gliv civserver eeyes gqview mutt giFTcurs su ssh wine make wget man ncftp emacs soundtracker civserver civclient angband mikmod xmp mod ogg123 play mpg123 mpg321 transcode mplayer esdcat ftp lftp"
for i in $NOTIFY ; do alias $i="notify `(alias $i 2>/dev/null || echo \"'$i'\") |perl -pe '/'\''(.*)'\''/;$_=$1'` "; done
fi
export HISTSIZE=100000
export HISTFILE=~/.bash_history
export PATH=$PATH:$HOME/bin:/usr/local/bin
export LESSCHARSET="latin1"
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export CVS_RSH=ssh
setopt interactivecomments appendhistory autoparamslash autopushd nobeep cbases
setopt chaselinks nohup nolisttypes multios printeightbit nopromptcr 
setopt sharehistory
stty -ixon
