summaryrefslogtreecommitdiffstats
path: root/zshrc
blob: 7126283fd05fea2965005002810c52ad94f3f783 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
PTIME=%{$(echo -n '\e[0;40;35m')%}%T
PUSER=%{$(echo -n '\e[0;40;37m')%}%n
PATKI=%{$(echo -n '\e[1;37m')%}@
PHOST=%{$(echo -n '\e[1;32m')%}%m
PDOPP=%{$(echo -n '\e[1;37m')%}:
PPATH=%{$(echo -n '\e[1;32m')%}%~
PCOMM=%{$(echo -n '\e[0;37m')%}
PROMPT="$PUSER$PATKI$PHOST$PDOPP$PPATH$PCOMM • "

export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/games

# Set terminal title dynamic
case $TERM in
	rxvt*)
    		precmd () {print -Pn "\e]0;%n@%m: %~\a"}
	;;
esac

HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
PATH=~/bin:$PATH

autoload -U compinit; compinit
autoload zmv

alias ls="ls --color=auto"
alias l="ls -laX"
alias cp="cp -v"
alias mkdir="mkdir -p"
alias grep="grep --color=auto"
alias g="gvim"
alias v="vim"
alias agu="sudo apt-get update"
alias agdu="sudo apt-get dist-upgrade"
alias acs="apt-cache search"
alias agi="sudo apt-get install"
alias purge="sudo apt-get --purge autoremove"
alias c="clear && fortune"
alias s="screen -r -d"
alias df="df -m"
alias iso="genisoimage -l -J -R -o cd.iso"
alias w="wicd-client -n"
alias gitlog="git log --pretty=oneline --abbrev-commit"
alias x="xine"
alias m="mocp"
alias mp="mplayer"
alias p="ping"
alias rmrf="rm -rf"
alias vbm="VBoxManage"
alias r='rdesktop-vrdp -k de -K localhost'
alias gitserv='git daemon --verbose --reuseaddr --base-path=. --export-all ./.git'
alias mud='telnet bl.mud.at 5678'
alias mu='mutt -F .muttrc'
alias mu2='mutt -F .muttrc2'
alias n='newsbeuter'

alias svn-uscan='uscan --verbose --force-download --rename --repack --destdir=../tarballs'
alias svn-bp='svn-buildpackage --svn-builder=pdebuild --svn-ignore-new'

alias -g C='| wc -l'
alias -g G='| grep'
alias -g H='| head'
alias -g T='| tail'
alias -g L='| less'

alias -s mp3=mplayer
alias -s exe=wine

setopt nobeep
setopt autocd
setopt listpacked
setopt listtypes

shot() {
	if [ "$1" != '' ]; then
		scrot -c -d 3 $1
		scp $1 xeno:www/pub/
		rm $1
	else
		scrot -c -d 3
	fi
}

gpdf() {
	xpdf =(gpg --decrypt $1)
}

md() {
	mkdir $1
	cd $1
}

ausrede() {
	if [ $RANDOM -lt 16384 ]; then
		fortune bofh-excuses
	else
		nc towel.blinkenlights.nl 666
	fi
}

vm() {
	SLEEP=1
	if [ "$1" = "winxp" ]; then
		VBoxManage startvm "Windows XP Pro SP1" -type vrdp
		sleep $SLEEP
		rdesktop-vrdp -k de localhost
	elif [ "$1" = "freebsd" ]; then
		VBoxManage startvm "FreeBSD 7.1" -type vrdp
		sleep $SLEEP
		rdesktop-vrdp -k de localhost
	elif [ "$1" = "win2003" ]; then
		VBoxManage startvm "Windows Server 2003 Enterprise" -type vrdp
		sleep $SLEEP
		rdesktop-vrdp -k de localhost
	elif [ "$1" = "pdc" ]; then
		VBoxManage startvm "Samba PDC mit LDAP" -type vrdp
		sleep $SLEEP
		rdesktop-vrdp -k de localhost
	elif [ "$1" = "sid" ]; then
		VBoxManage startvm "Debian Sid" -type vrdp
		sleep $SLEEP
		rdesktop-vrdp -k de localhost
	elif [ "$1" = "" ]; then
		echo "winxp"
		echo "win2003"
		echo "freebsd"
		echo "sid"
		echo "pdc"
	fi
}