dotfiles / .bashrc

if [ -f /local/lib/setupfiles/bashrc ] ; then
    source /local/lib/setupfiles/bashrc
fi

unalias -a

# Hva heter maskinene dine akkurat nĺ?
kontormaskin='arrakis'
laptop='Sulaco'

domainname=`echo $HOSTNAME | cut -d . -f 2`

HISTFILESIZE=10000
HISTSIZE=10000
HISTCONTROL=ignoredups
HISTTIMEFORMAT='%F %T '
HISTIGNORE='&:d:ls:lm:lm *'
EDITOR=vim

xset -b
export LC_ALL=""

#if [ "$TERM" != "dumb" ]; then
eval `dircolors -b`
# ls aliases
alias ls='ls --color=auto'
alias ll='ls -l'
alias la='ls -A'
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'
#set -o vi
alias :q='exit'
alias ct='rdesktop -k no -g 1920x1200 -d "UIO" -u "tvl" win.uio.no &'
alias killsnd='fuser -v /dev/snd/* | tr -s " " | cut -f 3 -d " " | xargs -n1 kill'
alias bofh='LC_CTYPE=nb_NO.UTF-8 bofh'
alias yum='yum -y'
#fi

export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;32'

mesg n

# SSH
alias thespug='ssh spug@thespug.net'
alias tvl='ssh tvl@login.uio.no'
alias usit='ssh tvl@${kontormaskin}.uio.no'
alias ifi='ssh tobiasvl@login.ifi.uio.no'
alias zak='ssh spug@zak.piratki.no'
alias lechuck='ssh spug@lechuck.radionova.no'
alias nova='ssh spug@cnpcnova1.uio.no'
alias PING="ssh tobias@knuth.ping.uio.no"
alias titan="ssh ps.titan.uio.no"
alias mdb="ssh mdb mdb"
alias tsh="ssh -t tsh /site/bin/tsh"

alias spotify='wine "C:\Program Files\Spotify\Spotify"'

LIGHT_GREEN='\[\033[01;32m\]'   # hjemme
LIGHT_RED='\[\033[01;31m\]'     # root
DARK_GRAY='\[\033[01;30m\]'     # ifi
LIGHT_GRAY='\[\033[0;37m\]'     # usit
LIGHT_CYAN='\[\033[01;36m\]'    # ping
LIGHT_PURPLE='\[\033[01;35m\]'  # nova

complete -d cd mkdir rmdir

if [[ $domainname == "ifi" ]]; then
    PS1='${debian_chroot:+($debian_chroot)}'$DARK_GRAY'\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \$ '
    export PATH=$PATH':/hom/peder/drift/bin/:/hom/peder/bin:/snacks/bin:/hom/termvakt/bin:/local/bin:/local/hacks/bin/printerspy:/snacks/bin:/usr/sbin:/store/sbin/:bin'
    # TERMVAKT:

    export PROPAGER='less -E -X'
    alias se='setenv PROPAGER cat'

    alias pspy='rcmd ritari /local/hacks/bin/printerspy'
    #alias vbp='uxterm -bg black -fg white -geometry 80x77 -fn *-fixed-*-*-*-10-* -e ~peder/bin/loop ~peder/bin/printerstatus -a vilhelm frimann vbfarge &'
    alias abelp='uxterm -bg black -fg white -geometry 80x26 -e loop -s 30 printerstatus -a niels &'
    alias infp="ssh -X nali 'uxterm -bg black -fg white -geometry 80x25 -e loop -s 30 printerstatus -a inf ' &"
    alias fysp='uxterm -bg black -fg white -geometry 80x25 -fn *-fixed-*-*-*-10-* -e ~peder/bin/loop ~peder/opt/termstue/bin/printerstatus -a quark &'

    alias kv='rwho | grep $1'

    # Kart
    alias 1302='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l 1302 &'
    alias 1303='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l 1303 &'
    alias 2406='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l 1303 &'
    alias 3217='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l 1303 &'
    alias 3325='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l 1303 &'
    alias 3420='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l 1303 &'
    alias aud='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l aud &'
    alias cmapvert='uxterm -bg black -fg white -geometry 62x31  -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l cmapvert&' 
    alias cyb='uxterm -bg black -fg white -geometry 62x31  -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l cyb&' 
    alias drift='uxterm -bg black -fg white -geometry 62x31  -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l driftmap&' 
    alias dsb='uxterm -bg black -fg white -geometry 62x31  -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l dsb&' 
    alias mmcl='uxterm -bg black -fg white -geometry 62x31  -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l mmcl&' 
    alias fui='uxterm -bg black -fg white -geometry 72x45 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l fuimap &'
    alias timevakt='~oystsot/bin/timevaktkart'
    alias mnsu='~peder/opt/termstue/bin/termstue -s 2 -G -stat -l ../../../../../tobiasvl/mnsu'

    #Termstuer
    #alias vb='uxterm -bg black -fg white -geometry 100x55 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l vbwide&' 
    alias abel='uxterm -bg black -fg white -geometry 112x59 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l abelwide&' 
    alias fys='uxterm -bg black -fg white -geometry 67x56 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l fysmap&' 
    alias inf='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l infmap &' 
    alias infwide='uxterm -bg black -fg white -geometry 90x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l infwide &' 
    alias infmap='inf'
    alias 100m='uxterm -bg black -fg white -geometry 80x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l park &' 
    alias veidekke='uxterm -bg black -fg white -geometry 80x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l veidekke &' 
    alias veilab='uxterm -bg black -fg white -geometry 80x30 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l veilab &' 

    alias tv='uxterm -bg black -fg white -geometry 67x21 -e ~peder/opt/termstue/bin/termstue -s 2 -G -stat -l tvmap&' 
    alias termhjelp='~peder/opt/termstue/bin/termstue -h'
    alias th='termhjelp'

    alias vb='xterm  -title "VB" -bg black -fg white  -fn -*-*-*-*-*-*-10-*-*-*-*-*-*-* -geometry 100x55+0+0 -e ~peder/bin/termstue -d -s 2 -G -stat -l vbwide&'
    alias c210='xterm -title "C210" -bg black -fg white  -fn -*-*-*-*-*-*-10-*-*-*-*-*-*-* -geometry 62x31+757+868 -e ~peder/opt/termstue/bin/termstue -d -s 2 -G -stat -l c210map&'
    alias c207='xterm -title "C207" -bg black -fg white  -fn -*-*-*-*-*-*-10-*-*-*-*-*-*-* -geometry 62x31+379+868  -e ~peder/opt/termstue/bin/termstue -d -s 2 -G -stat -l c207map&'
    alias c205='xterm -title "C205" -bg black -fg white  -fn -*-*-*-*-*-*-10-*-*-*-*-*-*-* -geometry 62x31+379+579  -e ~peder/opt/termstue/bin/termstue -d -s 2 -G -stat -l c205map&'
    alias c203='xterm -title "C203" -bg black -fg white  -fn -*-*-*-*-*-*-10-*-*-*-*-*-*-* -geometry 62x31+0+868  -e ~peder/opt/termstue/bin/termstue -d -s 2 -G -stat -l c203map&'
    alias c107='xterm -title "C107" -bg black -fg white  -fn -*-*-*-*-*-*-10-*-*-*-*-*-*-* -geometry 62x31+0+579  -e ~peder/opt/termstue/bin/termstue -d -s 2 -G -stat -l c107map&'
    alias tvV='xterm -title "Termvakter" -bg black -fg white  -fn -*-*-*-*-*-*-10-*-*-*-*-*-*-* -geometry 67x21+758+580 -e ~peder/opt/termstue/bin/termstue -d -s 2 -G -stat -l tvmap&'
    alias driftV='xterm -title "Drift" -bg black -fg white  -fn -*-*-*-*-*-*-10-*-*-*-*-*-*-* -geometry 72x45+605+0 -e ~peder/opt/termstue/bin/termstue -d -s 2 -G -stat -l driftmap &'
    alias vbp="ssh -Y nali 'xterm -bg black -fg white -geometry 80x77+1120+0 -fn *-fixed-*-*-*-10-* -e ~peder/bin/loop ~peder/bin/printerstatus -a vilhelm frimann vbfarge '&"
    alias vball='vb c107 c203 c205 c207 c210 tvV driftV vbp'
elif [[ $domainname == "ping" ]]; then
    PS1='${debian_chroot:+($debian_chroot)}'$LIGHT_CYAN'\u@\h\[\033[00m\]:\[\033[0;34m\]\w\[\033[00m\] \$ '
elif [[ $domainname == "uio" ]]; then
    PS1='${debian_chroot:+($debian_chroot)}'$LIGHT_GRAY'\u@\h\[\033[00m\]:\[\033[0;34m\]\w\[\033[00m\] \$ '
    export PATH='~/bin/wine-1.1.39:/sbin/:/local/sbin:/usr/bin/:/local/bin:/usr/sbin:/store/sbin/:bin:'$PATH
    alias ldap='ldapsearch -x -H "ldap://ldap.uio.no/" -b "cn=targets,cn=mail,dc=uio,dc=no" mail=mailadr'
    alias irssi='/usr/bin/irssi'
    export CVS_RSH=ssh
    export CVSROOT=cvs.uio.no:/usit/cvs/cvsroot
elif [[ $HOSTNAME == $laptop ]]; then
    PS1='${debian_chroot:+($debian_chroot)}'$LIGHT_GREEN'\u@\h\[\033[00m\]:\[\033[0;34m\]\w\[\033[00m\] \$ '
else 
    echo "Hvor er du?"
fi

export PATH=$PATH':.'
export PYTHONPATH=$PYTHONPATH:~/bin/twill-0.9/twill:~/bin//twill-0.9/

# rm wrapper function                                         -*- sh -*-                                                                                                                             
#
#    $Id: rmstar.sh,v 1.1 2007/05/01 19:17:39 peder Exp $
#

#rmstar() {
#    set +f
#    local skiprm= starfound= ans=
#
#    for i in "$@"; do
#        if [ "$i" == "*" ]; then
#            starfound=1
#            break
#        fi
#    done
#
#    if [ "$starfound" ]; then
#        read -p "Do you really want to delete all your files? [y/N]: " ans
#        case "$ans" in
#            y*|Y*)
#                :
#                ;;
#            *)
#                return
#                ;;
#        esac
#    fi
#
#    local IFS="^B"
#    command rm $@
#}

# check for rm alias....
#rm=$(alias rm 2>/dev/null)
#if [ "$rm" ]; then
#    rm=${rm#alias rm=\'}
#    rm=${rm%\'}
#    rm=${rm//rm/set -f; rmstar}
#    alias rm="$rm"
#    unset rm
#else
#    alias rm="set -f; rmstar"
#fi
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.