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

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

function pre_prompt {

let prompt_x=$(tput cols)-30
tput sc
tput cup 0 ${prompt_x}
echo -en $(bs-ng-parse-echo $sepacolor) "["
echo -en $(bs-ng-parse-echo $datecolor) "$(date '+%a, %d %b %y')"
echo -en $(bs-ng-parse-echo $sepacolor) "::"
echo -en $(bs-ng-parse-echo $timecolor) "$(date +%T)"
echo -en $(bs-ng-parse-echo $sepacolor) "]"
tput rc
}

export PROMPT_COMMAND=pre_prompt

PS1="$sepacolor[$usercolor \u $fontcolor@ $hostcolor\h $pscol: $wdircolor\$(truncpwd)$sepacolor ]$fontcolor "

elif [[ $enabcol == false ]]; then

function pre_prompt {

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

export PROMPT_COMMAND=pre_prompt

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

fi
