# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

umask 022

# If not running interactively, don't do anything
if [ "$PS1" ]; then

# =====================================
#    Custom Command Prompt
# =====================================
if [ "$TERM" != "vt100" ]; then
 
    CB="\[\e[1;30m\]"          # Black
    CR="\[\e[1;31m\]"          # Red
    CG="\[\e[1;32m\]"          # Green
    CY="\[\e[1;33m\]"          # Yellow
    CBL="\[\e[1;34m\]"         # Blue
    CP="\[\e[1;35m\]"          # Purple
    CCY="\[\e[1;36m\]"          # Cyan
    CW="\[\e[1;37m\]"          # White
    CGR="\[\e[0;37m\]"         # Gray

fi

PROMPT_COMMAND='if [ "$UID" != "0" ]; then
    PUser="[$CG\u@\h $CBL\W$CGR]$ "
  else
    PUser="[$CR\u$CG@\h $CBL\W$CGR]# "
  fi
  PS1="$PUser"
' 

# =====================================
# User specific aliases and functions
# =====================================
 
export LS_OPTIONS='--color=auto'
export GREP_COLOR='1;32'
export EDITOR=/usr/bin/vim

eval `dircolors`

alias vi='vim'
alias grep='grep --color=auto'
alias screen='screen -D -R'
alias ls='ls $LS_OPTIONS'
alias la='ls -A'
alias ll='ls -alF'
alias lol='ls -la'

# =====================================
# Begin User Greeting
# =====================================

/usr/bin/clear
cat /etc/motd

fi
