# Update dotfiles
pushcfg(){
	oldcwd=$(pwd); cd ~
	tar czfv cfg.tar.gz \
		.vimrc .gvimrc .vim .zshrc .zlogout .zsh .bashrc .bash_profile .bash_logout \
		$(find .myshell -type f | egrep -v "(local|.swp|~)" | xargs)
	scp -P 2929 cfg.tar.gz matusiak@matusiak.eu:~/public_html/numerodix/configs
	rm cfg.tar.gz
	cd $oldcwd
}

pullcfg(){
	oldcwd=$(pwd); cd ~
	wget http://www.matusiak.eu/numerodix/configs/cfg.tar.gz
	gunzip cfg.tar.gz
	tar xvf cfg.tar
	rm cfg.tar
	touch .myshell/common_local .myshell/bash_local .myshell/zsh_local .myshell/hostcolor_local
	find .zsh | xargs chmod 700 -R
	cd $oldcwd
}


alias lsh='ls --color -Flah'
alias ls='ls --color -F'
alias du1='nice -n12 du --max-depth=1 | sort -n'
alias nano='nano -w'
alias pico='nano -w'
alias make='nice -n 19 make'
alias xmerge='ACCEPT_KEYWORDS="~x86" emerge'
alias h='history | grep'
alias nano="nano -w --smooth"
alias ,='cd ..'
alias grep='grep --color=auto'
alias g=grep
alias p='ps axf'
alias gvim='gvim -p'
#alias vim='vim -p'
alias x86info='x86info -mhz'
alias pk='pkill -9'
alias pkm='pkill -9 mplayer'
#alias esw='emerge --sync && emerge world -uDa'
alias esw='emerge --sync && update-eix && update-eix-remote update && emerge world -uDa'
alias efw='emerge world -uDav'
alias es='emerge --sync && emerge world -ua'
alias ew='emerge world -ua'
alias eo='emerge -1av'
alias xo='ACCEPT_KEYWORDS="~x86" emerge -1av'
alias rundep='nice -n 19 /usr/local/bin/dep'
alias x='startx && logout'
alias iftop='iftop -B'
alias to='htop'
alias vm='nice -n1 vmware &'

export MANPAGER="col -b |vim -R -u ~/.vimrc -c 'set ft=man nomod nolist' -" 

function spell {
	echo $@ | ispell
}

if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi


# set prompt in colors, if found
if [ -f ~/.myshell/hostcolor_local ]; then
	hostcolor=$(cat ~/.myshell/hostcolor_local)
	if [ -n "$hostcolor" ]; then
		if [ -f ~/.myshell/colors ]; then
			source ~/.myshell/colors
		fi
	fi
fi



[[ -f ~/.myshell/common_local ]] && \
source ~/.myshell/common_local

