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

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

PROMPT_COMMAND=pre_prompt

PS1="${color_separator}[${color_user} \u ${color_font}@ ${color_host}\h ${color_ps}: ${color_wdir}\$(truncpwd)$CLOCK_1_COLOR\$(CLOCK_1) ${color_separator}]${color_font} "
