#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG  				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2010 Christopher Bratusek		#
#							#
#########################################################

if [[ $enabcol == true ]]; then

function pre_prompt {

let prompt_x=$(tput cols)-29
tput sc
tput cup 0 ${prompt_x}
echo -en "$(echo $sepacolor | sed -e 's/\\\[//g' -e 's/\\\]//g')\
[$(echo $datecolor | sed -e 's/\\\[//g' -e 's/\\\]//g') \
$(date '+%a, %d %b %y')\
$(echo $sepacolor | sed -e 's/\\\[//g' -e 's/\\\]//g') ::\
$(echo $timecolor | sed -e 's/\\\[//g' -e 's/\\\]//g') $(date +%T)\
$(echo $sepacolor | sed -e 's/\\\[//g' -e 's/\\\]//g') ]"
tput rc
}

PROMPT_COMMAND=pre_prompt

PS1="$sepacolor[$usercolor \u $fontcolor@ $hostcolor\h $pscolor: $wdircolor\$(trunc_pwd)$CLOCK_1_COLOR\$(CLOCK_1) $sepacolor]$fontcolor "

else

function pre_prompt {

let prompt_x=$(tput cols)-29
tput sc
tput cup 0 ${prompt_x}
echo -n "[ $(date '+%a, %d %b %y') :: $(date +%T) ]"
tput rc
}

PROMPT_COMMAND=pre_prompt

PS1="[ \u @ \h : \$(trunc_pwd) \$(CLOCK_1) ] "

fi
