1 # *I* *HATE* *OpenGL*!!!11!
2 alias gl="gcc -L/usr/X11R6/lib -L/usr/X11/lib -lglut -lGL -lGLU -lXi -lXmu -lXt -lXext -lSM -lm -lX11"
3 alias ogl="g++ -L/usr/X11R6/lib -lglut -lGLU -lGL -lXi -lXmu"
4 # needed for some sources from CVS
5 alias autofuck='aclocal && autoheader && libtoolize --copy --automake && automake --copy --add-missing && autoconf'
6 # See <http://strcat.neessen.net/hacks/rand-useragent.pl> ;-)
7 if [ -x ~/bin/rand-useragent.pl ] && [ -x $(which w3m) ]; then
8 alias w3m='w3m -o user_agent="`rand-useragent.pl`" $1'
10 # Edit my sigquotes ;-)
11 alias esig="$EDITOR ~/.sigs/own-stuff"
12 # I like this player ;-)
13 if [ -x $(which mp3blaster) ]; then
14 alias mp3blaster="mp3blaster -a .xmms/xmms.m3u -f .now_playing"
16 # Quick edit often used setup file
17 alias z='$EDITOR ~/.zshrc'
18 alias s='$EDITOR ~/.slrnrc'
19 alias v='$EDITOR ~/.vimrc'
22 # VIM related aliases ;o) btw. ``$SHELL:t'' is a modifiers from the Z
23 # Shell. In other shells you can use ``${SHELL##*/}'' instead. Valid
24 # Modifiers can be found in ``info -f zsh -n Modifiers''.
25 alias :w='echo "Dude.. thats $SHELL:t and *not* VI(M)!"'
26 alias :q='echo "Dude.. thats $SHELL:t and *not* VI(M)!"'
27 alias :wq='echo "Dude.. thats $SHELL:t and *not* VI(M)!"'
29 alias view="${EDITOR} -R"
30 alias ex="${EDITOR} -e"
31 alias pltags="${VIMRUNTIME}/tools/pltags.pl"
33 # highlight the current day in ``cal''
34 alias _cal='var=$(cal); echo "${var/$(date +%-d)/$(echo -e "\033[1;31m$(date +%-d)\033[0m")}"'
37 alias mirror="noglob wget --mirror --no-parent --convert-links --recursive --timestamping --continue$1"
39 # access the database of ${HOME} (Note: This is for *OpenBSD*! Not for
41 if [ "${OS}" = openbsd ]; then
42 alias hupdatedb="updatedb --searchpaths="$HOME" --prunepaths="/" --fcodes=$HOME/.locatedb"
43 alias hlocate="locate -d ${HOME}/.locatedb"
45 # That's for Linux (strictly speaking slocate under Slackware).
46 # See <http://www.geekreview.org/slocate/> for details.
47 if [ "${OS}" = linux-gnu ] && [ -x $(which slocate) ]; then
48 alias hupdatedb="updatedb -U ${HOME} --output=${HOME}/.locatedb -e /home/dope/tmp,/home/dope/MuttMail,/home/dope/.cpan"
49 alias hlocate="slocate --database=${HOME}/.locatedb $1"
51 # That's for GNU updatedb
52 alias hupdatedb="updatedb --localpaths="$HOME" --output=$HOME/.locatedb --prunefs="/""
53 alias hlocate="locate -d ${HOME}/.locatedb"
57 # some stuff for gentoo (i compelled to use it sometimes *narf*)
58 if [ -e "/etc/gentoo-release" ]; then
59 alias emerge="sudo emerge"
60 alias eupdatedb="sudo eupdatedb"
61 alias etc-update="sudo /usr/sbin/etc-update"
62 alias env-update="sudo /usr/sbin/env-update"
64 # See <http://www.swaret.org/> and <http://software.jaos.org> for details
65 if [ -e "/etc/slackware-version" ]; then
66 alias slapt-get="sudo slapt-get"
67 alias swaret="sudo swaret"
68 alias installpkg="sudo /sbin/installpkg"
69 alias upgradepkg="sudo /sbin/upgradepkg"
70 alias removepkg="sudo /sbin/removepkg"
71 alias pkgtool="sudo /sbin/pkgtool"
72 alias makepkg="sudo /sbin/makepkg"
76 if [[ "${OSTYPE}" == netbsd* ]]; then
77 export CVSROOT=":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot"
78 alias upsrc="cvs -d $CVSROOT update -PAd src"
79 alias uppkgsrc="cvs -d $CVSROOT update -PAd pkgsrc"
82 if [[ "{$OSTYPE}" == openbsd* ]]; then
83 export CVSROOT='anoncvs@anoncvs1.usa.openbsd.org:/cvs'
84 alias pkg_add='sudo pkg_add'
85 alias pkg_delete='sudo pkg_delete'
86 alias upsrc="cd /usr/src && cvs -q up -Pd"
87 alias upports="cd /usr && cvs -q get -P ports"
89 # takes snapshot from /dev/ttyN
90 alias snapscreenshot="sudo snapscreenshot"
91 alias mkscreeny="cd ~/shots/ ; sleep 5; snapscreenshot -c1 -x1 > snap.tga ; convert snap.tga snap.png"
93 # grep wrapper with search highlighting (<http://www.acme.com/software/hgrep/>)
94 # Only for non-linux systems needed (see below)
95 if [ ! "${OSTYPE}" = linux-gnu ] && [ -x $(which hgrep) ]; then
99 # FIXME: ``${(MS)$(grep --version 2>/dev/null)#GNU}'' shows me ``GNU''
100 # and export the variables correctly. But why (BY ZEUS FAT ASS)
101 # become ``GREP_{COLOR,OPTIONS}'' exported if the string ``GNU''
103 # Note: ``--color'' is a feature from GNU grep >=2.5 and i do *not*
104 # check for the available version, but only for ``GNU''!
105 if [ ${OS} = "linux-gnu" -n ${(MS)$(grep --version 2>/dev/null)#GNU} ]; then
106 export GREP_COLOR='0;31'
107 export GREP_OPTIONS='--color=auto'
108 alias hgrep='grep $GREP_OPTIONS $*'
112 # ``choad'' is a small perlscript to ripp audio-cds
113 if [ -x $(which choad) ]; then
114 alias choad="sudo choad"
116 # VimTip 121: Using vim as a syntax-highlighting pager
117 # <http://vim.sourceforge.net/tip_view.php?tip_id=>
118 if [ -e ~/.vimrc.more ] && [ -x $(which vim) ]; then
119 alias vmore='vim -u ~/.vimrc.more'
121 # I use ``gls'' instead of ls because the standard 'ls' from OpenBSD
122 # doesn't not support colors :/ GNU ls is part of fileutils-4.1 and
123 # component of the portcollection ($PORTSDIR/misc/fileutils)
124 # [[ ${OS} = "linux" && -n ${(MS)$(ls --version 2>/dev/null)#GNU} ]] && ls_flags="--color"
125 # (ls --help 2>/dev/null |grep -- --color=) >/dev/null && alias ls='ls -b -CF --color=auto'
126 if [ -x $(which gls) ]; then
127 alias ls='gls --color=always'
129 [ ${OS} = "linux-gnu" -n ${(MS)$(ls --version 2>/dev/null)#GNU} ];
131 export TIMESTYLE=$'--time-style="+\e[1;37m[\e[1;35m%D %H:%M\e[1;37m]\e[0m"'
132 alias ls="ls -b -CF --color=always ${TIMESTYLE}"
136 # call mailfilter and start getmail after a positive return value
137 # <http://mailfilter.sourceforge.net/> && <http://www.qcc.ca/~charlesc/software/getmail-3.0/>
138 alias gmail='mailfilter -r || getmail -v --rcfile ~/.getmail/getmailrc --rcfile ~/.getmail/getmail-hardening'
139 # X11? Yes! A open port? Nope!
140 # alias sx='startx -- -nolisten tcp 2>&1 ~/.startx-errors'
141 # alias sx='startx -- -nolisten tcp >& $HOME/.startx-errors'
142 alias sx='startx -- -deferglyphs 16 -dpi 100 -nolisten tcp >& $HOME/.startx-errors'
143 # SSH to some hosts :>
144 alias router="ssh dope@192.168.13.2"
145 alias hellfire="ssh dope@192.168.13.3"
146 alias dreckskind="ssh dope@192.168.13.4"
147 alias firewall="ssh bofh@192.168.13.5"
148 alias blitzkrieg="ssh dope@192.168.13.6"
149 alias diehard="ssh lart@192.168.13.7"
150 # "-" is the same as the -l option (deprecated).
152 # format a floppy (OpenBSD)
153 alias format="fdformat /dev/rfc0a"
155 alias rw-='chmod 600'
156 alias rwx='chmod 700'
157 alias r--='chmod 644'
158 alias r-x='chmod 755'
159 # stolen from a ~/.bashrc (IIRC RedHat(?))
162 alias ....="cd ../../.."
163 # Make/Create/Convert Pics/Thumbnails
164 alias _GIF='convert -verbose -interlace LINE'
165 alias _thumb='convert -geometry 100x100 -interlace LINE -verbose'
166 alias _thumb150='convert -geometry 150x150 -interlace LINE -verbose'
167 alias _thumb200='convert -geometry 200x200 -interlace LINE -verbose'
168 # Use colors, do not check for new groups, specific my killfile an use
169 # spool (needed for slrnpull)
170 alias news='slrn -C -n --kill-log /home/dope/.slang/KILL --spool'
171 alias gnews='slrnpull -d /home/dope/nslrn/slrnpull -h news.individual.net'
172 # start mutt/vim/zsh/jed without any setup
173 alias null-mutt='mutt -n -f /dev/null -F /dev/null'
174 alias null-zsh='zsh -f'
175 alias null-vim='vim -u NONE'
176 alias null-jed='jed -n'
178 alias lsd='ls -ld *(/)' # only show directories
179 alias lad='ls -ld .*(/)' # only show dot-directories
180 alias lsa='ls -a .*(.)' # only show dot-files
181 alias lsbig='ls -lSh *(.) | head' # display the biggest files
182 alias lssmall='ls -Sl *(.) | tail' # display the smallest files
183 alias lsnew='ls -rtl *(.) | tail' # display the newest files
184 alias lsold='ls -rtl *(.) | head' # display the oldest files
185 # check out/in RCS revisions
188 # convert from UPPER to lower (or back)
189 alias UP2low='for i in *(.); mv $i ${i:l}'
190 alias low2UP='for i in *(.); mv $i ${i:u}'
191 # ctags are *very* useful!
192 alias mktags='for i in **/*(/); do (cd $i; eval '\''ctags-exuberant *'\''); done; ctags-exuberant --file-scope=no -R'
193 # Make the source to be with you!!!11!
194 alias C='./configure'
195 alias CH='./configure --help | $PAGER'
196 # zmv -- see ``less ${^fpath}/zmv(N)'' for more details.
200 if [ -x =sudo ]; then
201 alias ifconfig="sudo ifconfig"
202 alias shutdown="sudo shutdown"
203 alias tcpdump="sudo tcpdump"
204 alias nmap="sudo nmap"
206 # simple replacement for nmap (anywise .. :>)
207 alias pscan="nc -vz $1 1-1024"
208 # Yup. I mount my CDROM manually!
209 if [ "${OS}" = openbsd ]; then
210 alias _mcd='sudo mount /dev/cd0a /mnt && cd /mnt && ls'
211 alias _ucd='cd ~ && sudo umount /mnt'
213 alias _mcd='sudo mount /mnt/cdrom && cd /mnt/cdrom && ls'
214 alias _ucd='cd ~ && sudo umount /mnt/cdrom'
216 # Yup. i use Gnus.. sometimes..
217 if [ -x /usr/bin/emacs-21.3-with-x11 ]; then
218 alias emacs='emacs -nw -f server-start'
219 alias gnus='emacs -f gnus'
220 alias emacsnox='/usr/bin/emacs -nw'
224 alias get.pgpkey='gpg --keyserver pgp.mit.edu --recv-key 0x"$@"'
225 alias mail.gpgkey='mail -s "GET keyid $@" pgp-public-keys@keys.pgp.net'
226 alias encrypt.gpg='echo "WARNING: plaintext is not deleted!"; gpg --quiet -ear 0x47E322CE'
227 alias sign.gpg='gpg --sign $*'
229 alias p5='http://64.236.34.97:5190/stream/1006'
230 alias p4='mpg123 http://linux10.cs.uaf.edu:8000/kuac24mono'
231 alias p3='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-petre-128'
232 alias p2='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-p2-128'
233 alias p1='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-p1-128'
234 alias relax='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-alltid-klassisk-128'
235 alias mpetre='mpg123 -b 1024 http://radio.hiof.no:8000/nrk-mpetre-128'
236 alias c64='xmms http://radio.c64.org:8000/ &'
237 alias classical='xmms http://64.236.34.97:5190/stream/1006 &'
238 # Some aliases for the OpenBSD - Portcollection
239 if [ "${OS}" = openbsd ]; then
240 alias Svar='make show=FLAVORS'
241 alias Spversion='make show=VERSION'
242 alias Scomm='make show=COMMENT'
243 alias Swth='make show=DESCRIPTION'
245 # Ask stupid questions? In Boards/NGs? Yeah .. sure "Killing time.. the
246 # end of .." --Metallica :>
247 # I read this fuckings manuals *very* often *narf*
248 alias H-Slrn='less /backups/Documentations/Manuals/slrn-manual.txt'
249 alias H-Mutt='less /backups/Documentations/Manuals/mutt-manual.txt'
250 alias H-Irssi='less /backups/Documentations/Manuals/irssi-manual.txt'
251 alias H-Getmail='less /backups/Documentations/Manuals/getmail-manual.txt'
252 # The Open Group Base Specifications Issue 6 (IEEE Std 1003.1, 2003
254 alias H-Susv3='${BROWSER:-lynx} /backups/Documentations/susv3/index.html'
255 # YES! Zsh _is_ evil :>
256 alias H-Zsh='${BROWSER:-lynx} /backups/Documentations/Zsh/Doc/zsh_toc.html'
257 alias H-ZshGuide='${BROWSER:-lynx} /backups/Documentations/Zsh/guide/zshguide.html'
258 alias H-ZshFAQ='${BROWSER:-lynx} /backups/Documentations/Zsh/guide/faqs.orgfaqsunix-faqshellzsh.html'
259 # The Linuxfibel (German). See <http://www.fibel.org/> for details.
260 alias H-Linux='${BROWSER:-lynx} /backups/Documentations/Linux/linux/index.html'
261 # Yup. I'm fucking lazy :>
262 alias H-OpenBSD='${BROWSER:-lynx} /backups/Documentations/OpenBSD/index.html'
263 alias H-FreeBSD='${BROWSER:-lynx} /backups/Documentations/FreeBSD/index.html'
264 alias H-NetBSD='${BROWSER:-lynx} /backups/Documentations/NetBSD/index.html'
265 # de.comp.os.unix.linux - FAQ
266 alias H-Dcoul='${BROWSER:-lynx} /backups/Documentations/dcoul/html/index.html'
267 # The editor of my choice! The one and only! J-E-H-O-V-A!!!11!
268 alias H-Vim='${BROWSER:-lynx} /backups/Documentations/Vim/usr_toc.html'
269 # THE SED FAQ (<http://sed.sourceforge.net/sedfaq.html>)
270 alias H-Sed="${BROWSER:-lynx} /backups/Documentations/Sed/sedfaq.html"
272 alias H-HTML='${BROWSER:-lynx} /backups/Documentations/Self-HTML/index.htm'
273 # The Jargon File (version 4.4.7)
274 alias H-Jargon='${BROWSER:-lynx} /backups/Documentations/Jargon/html/index.html'
275 # CSS .. Fuck me gently with a chainsaw
276 alias H-CSS='${BROWSER:-lynx} /backups/Documentations/CSS/index.html'
277 # Fucking FHS *gnarf*
278 alias H-FHS='${BROWSER:-lynx} /backups/Documentations/Linux/fhs-2.3.html'
279 # Extensible Markup Language
280 alias H-XML='${BROWSER:-lynx} /backups/Documentations/XML/index.html'
282 # -<http://www.ibiblio.org/pub/Linux/docs/LDP/man-pages/manpages-de-0.4.tar.gz>
283 alias de-man="man -M /backups/Documentations/manpages.de '$1'"
284 # fucking devices *narf*
285 if [ "${OS}" = linux-gnu ]; then
286 alias H-Devices='${PAGER:-less} /usr/src/linux/Documentation/devices.txt'
288 # See http://svnbook.red-bean.com/
289 alias H-Svn="{BROWSER:-lynx} /backups/Documentations/svnbook-1.1/index.html"
290 # RFC-Index. Not really needed. See <http://strcat.neessen.net/hacks/rfc.zsh>
292 # alias H-RFC='${BROWSER:-lynx} /backups/Documentations/RFCs/rfc-index.txt.gz'
293 # Xterm specific stuff
294 alias mxterm-default='echo -e "\033]50;fixed\007"'
295 alias mxterm-normal=default
296 alias mxterm-hide='echo -en "\033]50;nil2\007"'
297 alias mxterm-tiny='echo -en "\033]50;5x7\007"'
298 alias mxterm-small='echo -en "\033]50;6x10\007"'
299 alias mxterm-medium='echo -en "\033]50;7x13\007"'
300 alias mxterm-large='echo -en "\033]50;9x15\007"'
301 alias mxterm-huge='echo -en "\033]50;10x20\007"'
302 if [ "$TERM" = "xterm" ] && [ "$LINES" -ge 50 ] && [ "$COLUMNS" -ge 100 ]; then
305 # Postscript, LaTeX and printing
306 alias pnm2ps='pnmtops -width 8.26 -height 11.69'
307 alias gif2ps='(giftopnm | pnm2ps)'
308 alias jpeg2ps='(djpeg | pnm2ps)'
309 alias png2ps='(pngtopnm | pnm2ps)'
310 alias ps2psbook="(psbook | psnup -2 | tumble)"
311 alias ps2A5-haefte="(psbook -s8 | psnup -4 )"
312 alias sho='xdvi -s 2 -expert -geometry 1010x900+30+1030'
313 alias _dvishow='xdvi -s 3 -expert -geometry 990x990'
314 # Change keyboard mapping on the fly (nice for programming)
315 if [ -x $(which xmodmap) ]; then
316 alias US-e="xmodmap ~/.keys-emacs-us; xmodmap -e 'keysym Alt_L = Meta_L Alt_L'"
317 alias US-v="xmodmap ~/.keys-vi-us; xmodmap -e 'keysym Alt_L = Meta_L Alt_L'"
318 alias US="xmodmap ~/.keys-vi-us; xmodmap -e 'keysym Alt_L = Meta_L Alt_L'"
320 # some global aliases for redirection
321 alias -g N="&>/dev/null"
322 alias -g 1N="1>/dev/null"
323 alias -g 2N="2>/dev/null"
324 alias -g DN="/dev/null"
326 # suffix aliases (needs Zsh >= 4.2.0). Suffix aliases allow the shell
327 # to run a command on a file by suffix, e.g 'alias -s ps=gv' makes
328 # 'foo.ps' execute 'gv foo.ps'.
329 if [[ $ZSH_VERSION == 4.2.<0->* ]]; then
336 alias -s html=${BROWSER:-lynx}
337 alias -s htm=${BROWSER:-lynx}
338 alias -s tex=${EDITOR:-vi}
339 alias -s txt=${PAGER:-less}
341 alias -s jpeg=display
346 alias -s gz=show-archive
347 alias -s tar=show-archive
348 alias -s bz2=show-archive
349 alias -s zip=show-archive