#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG 6.7				#
#							#
# 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)-13
tput sc
tput cup 0 ${prompt_x}
echo -en $(echo $sepacolor | sed -e 's/\\\[//g' -e 's/\\\]//g') "["
echo -en $(echo $datecolor | sed -e 's/\\\[//g' -e 's/\\\]//g') "$(date +%T)"
echo -en $(echo $sepacolor | sed -e 's/\\\[//g' -e 's/\\\]//g') "]"
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)-10
tput sc
tput cup 0 ${prompt_x}
echo -n "["
echo -n " $(date +%T) "
echo -n "]"
tput rc
}

export PROMPT_COMMAND=pre_prompt

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

fi
