#!/bin/bash # $Id: etc-bashrc.txt,v 1.1 2006-11-24 19:39:16 nickb Exp $ if [ -f ~/.alias ]; then source ~/.alias; fi export KDEDIR=/usr export QTDIR=/usr/share/qt3 export EDITOR=vi norm="\033[0;39m"; grey="\033[1;30m"; green="\033[1;32m"; brown="\033[0;33m"; yellow="\033[1;33m"; blue="\033[1;34m"; cyan="\033[1;36m"; red="\033[1;31m"; if [ "$HOSTNAME" = "nickbdesk" ]; then hcol=$brown; ucol=$cyan; elif [ "$HOSTNAME" = "nickblappy" ]; then hcol=$yellow; ucol=$cyan; elif [ "$HOSTNAME" = "ubyzero" ]; then ucol=$brown; hcol=$grey; else ucol=$grey; hcol=$grey; fi rcol=$red; if [ $UID -eq 0 ]; then # root prompt="\! $rcol\]\u@$hcol\h$norm:\$(lspathseg 3)\\[$norm\] $rcol#$norm "; fcol=$brown; else prompt="\! $ucol\]\u@$hcol\h$norm:\$(lspathseg 3)\\[$norm\] $ucol\$$norm "; fcol=$ucol; fi # If this is an xterm set the title to user@host case $TERM in xterm*) export PS1=$prompt"\[\e]30;\u@\H\a\]" export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' echo -e $fcol; fortune -a; echo -e $norm; ;; *) export PS1=$prompt ;; esac