# Time-stamp: "2008-04-05 08:56:03 (as)"

# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory
bindkey -e
# End of lines configured by zsh-newuser-install

# The following lines were added by compinstall
zstyle :compinstall filename '/home/as/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall

export SHELL=/bin/zsh

# \u@\h:\w\$
#export PS1="%n@%m:%~%# "

#autoload colors zsh/terminfo
#if [[ "$terminfo[colors]" -ge 8 ]]; then
#	colors
#fi
#PS1="${debian_chroot:+($debian_chroot)}%n@%B$fg[green]%m%b$fg[clear]:%~%(!.#.\$) "

PS1="${debian_chroot:+($debian_chroot)}%n@$(print '%{\e[1;32m%}%m%{\e[0m%}'):%~%(!.#.\$) "

export TZ="/usr/share/zoneinfo/Europe/Bratislava"

# aliases
alias rm='rm --preserve-root --one-file-system -I'
alias ls='ls --color'
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'

alias lk='ls -lSr'  # by size
alias lc='ls -lcrt' # by time

alias g='egrep --color=auto'
alias gi='egrep -i --color=auto'

alias grep='grep --color=auto'
alias egrep='egrep --color=auto'

alias emacs='emacsclient -c'
alias emacsd='emacs23 --daemon'
#alias emacs-kill="emacsclient -e '(client-save-kill-emacs)'"
alias emacs-kill="emacsclient -e \"(progn (setq desktop-save \\\"~/\\\") (save-some-buffers) (kill-emacs))\""
alias emacs-kill-9="emacsclient -e \"(progn (setq desktop-save \\\"~/\\\") (save-some-buffers) (setq kill-emacs-hook 'nil) (kill-emacs))\""


# open in existing frame
emacs-open() { emacsclient -e "(find-file \"$1\")'" }
alias eo=emacs-open

alias debian-new=~/bin/scripts/debian-new.sh

alias pkgsize="dpkg-query -W --showformat='\${Installed-Size;10}\t\${Package}\n' | sort -k1,1n"

setopt HIST_IGNORE_ALL_DUPS

export PAGER=less
#export EDITOR=zile
#export VISUAL=zile
export EDITOR=qemacs
export VISUAL=qemacs
export BROWSER='opera -newpage'

set -o noclobber

#setterm -blength 0

# env variables for programs
. ~/.env

alias m=~/bin/mplayer.sh
alias m2=~/bin/mplayer2.sh

latexpdf() {
        pdflatex "$1" && evince `echo "$1" | sed s/\.tex$/\.pdf/`
}

export BREAK_CHARS="\"#'(),;\`\\|!?[]{}"
alias sbcl="rlwrap -b \$BREAK_CHARS sbcl"

alias new='sh ~/bin/new.sh /tmp/stats.new'