--- /dev/null
+#!/usr/bin/zsh
+# License: GPLv3+
+
+RES=('1280x1024' '1920x1200')
+
+if [[ -n ${1} ]]; then
+ typeset -A RESMAP
+ RESMAP=('02.150' '2'
+ '02.133' '2')
+ read -A ROOM <<< $(${HOME}/bin/cipmap.sh -l|grep ${USER})
+ # Note: Alter the number below such that it reflects the
+ # position of the Room-ID in the cipmap.sh output
+ # for your user; counting from right to left.
+ ROOM=${ROOM[-2]}
+
+ NEXT=${RESMAP[${ROOM}]}
+ NEXT=${NEXT:-1}
+else
+ read -A CURRENT <<< $(grep '*' - < <(xrandr))
+ CURRENT=${CURRENT[1]}
+
+ for INDEX in {1..${#RES}}; do
+ if [[ "${CURRENT}" == "${RES[${INDEX}]}" ]]; then
+ if [[ ${INDEX} -lt ${#RES} ]]; then
+ NEXT=$(( INDEX+1 ))
+ else
+ NEXT=1
+ fi
+ break
+ fi
+ done;
+fi
+
+# Try to set new resolution.
+TRIES=1; RUN=1
+while [[ ${TRIES} -lt 33 && ${RUN} -eq 1 ]]; do
+ if xrandr -s ${RES[${NEXT}]} > /dev/null; then
+ RUN=0;
+ else
+ print -- 'Error: Failed setting resolution!'
+ print -- " Current: ${CURRENT} - Next: ${RESOLUTIONS[${NEXT}]}"
+ sleep .1
+ (( TRIES++ ))
+ fi
+done
--- /dev/null
+#!/bin/zsh
+
+setopt auto_cd extended_glob auto_pushd pushd_ignore_dups
+setopt hist_ignore_all_dups append_history extended_history hist_reduce_blanks
+setopt correct complete_in_word
+setopt prompt_subst transient_rprompt
+
+HISTFILE=~/.histfile
+HISTSIZE=10000
+SAVEHIST=12000
+DOMAIN=`hostname -f`
+
+eval `dircolors`
+eval `lesspipe`
+
+export EDITOR="emacsclient -a '' -nw"
+export PAGER=less
+
+export LESS_TERMCAP_mb=$'\e[01;31m'
+export LESS_TERMCAP_md=$'\e[01;31m'
+export LESS_TERMCAP_me=$'\e[0m'
+export LESS_TERMCAP_se=$'\e[0m'
+export LESS_TERMCAP_so=$'\e[01;44;33m'
+export LESS_TERMCAP_ue=$'\e[0m'
+export LESS_TERMCAP_us=$'\e[01;32m'
+
+autoload -Uz compinit
+autoload -Uz vcs_info
+autoload -Uz colors
+
+compinit
+vcs_info
+colors
+
+zmodload -i zsh/complist
+
+zstyle :compinstall filename '/home/christoph/.zshrc'
+zstyle ':completion:*' menu select=3
+zstyle -e ':completion::*:*:*:hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2|_uni|_debian)(N) /dev/null)"}%%[# ]*}//,/ })'
+zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
+
+bindkey -e
+bindkey '\ee' backward-word
+bindkey '\ef' forward-word
+bindkey '\e[B' down-line-or-search
+bindkey '\e[A' up-line-or-search
+bindkey '\e[28~' run-help
+
+
+
+setWindowTitle(){
+ echo -e '\033]0;'$1'\007'
+}
+
+precmd () {
+ vcs_info
+ setWindowTitle ${USER}@${HOST}
+}
+
+config=("default" "`uname -s`")
+
+case "${DOMAIN//cs.fau.de/informatik.uni-erlangen.de}" in
+ (*.debian.org)
+ export EMAIL=christoph@debian.org
+ config=($config debian)
+ ;;
+ (faui49*.uni-erlangen.de)
+ export EMAIL=Christoph.Egger@cs.fau.de
+ config=($config i4lab)
+ ;;
+ (faui0*.informatik.uni-erlangen.de|faui48*.informatik.uni-erlangen.de)
+ export EMAIL=siccegge@cs.fau.de
+ config=($config cip)
+ ;;
+ (*.siccegge.de)
+ export MAIL=christoph@christoph-egger.org
+ config=($config home)
+ ;;
+esac
+
+PROMPT=$'%{$fg[yellow]%}%n@%{$fg[magenta]%}%m%{$reset_color%} %~ \n%{$fg[cyan]%}%T%{$reset_color%} %0(?,%{$fg[green]%},%{$fg[red]%}%s)%?%{$reset_color%} %# '
+RPROMPT='${vcs_info_msg_0_}'
+
+export DEBEMAIL='christoph@debian.org'
+export DEBFULLNAME='Christoph Egger'
+export DEB_BUILD_OPTIONS="parallel=$(getconf _NPROCESSORS_ONLN)"
+
+
+for ftype in aliases includes
+do
+ for location in $config
+ do
+ if [ -f ~/.zsh/${ftype}/${location}.zsh ]
+ then
+ source ~/.zsh/${ftype}/${location}.zsh
+ fi
+ done
+done
+
+
+
+karma () {
+ gpg --fingerprint $1 >> ${HOME}/karma
+ printf '\n-----\n\n' >> ${HOME}/karma
+}
+
+gpgrefresh () {
+ gpg --refresh-keys 2>&1 | grep -v 'nicht geƤndert'
+}
+
+sponsor() {
+ pkgname=`echo $i | rcut -d '/' -f 1 | cut -d '_' -f 1`
+ apt-get --download-only -t unstable $pkgname
+ dget $i
+}
+
+path=(${HOME}/bin $path)
+fpath=(${HOME}/.zsh/functions/$CONFIG ${HOME}/.zsh/functions/default $fpath)
+
+export PATH
+export FPATH
+
+alias wb="ssh -t buildd.debian.org wb"