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

if [[ ${enable_colors} == 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}\$(truncpwd)$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 : \$(truncpwd) \$(CLOCK_1) ] "

fi
