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

export custom_prompt=$(gconftool-2 --get /apps/bashstyle/custom_prompt)

export custom_command=$(gconftool-2 --get /apps/bashstyle/custom_command)

if [[ $use_custom_prompt == true && $custom_prompt != "" && $custom_prompt != "Not Supported" ]]; then
	if [[ $custom_command != "" && $custom_command != "Not Supported" ]]; then
		echo -e "function pre_prompt { \n $custom_command \n } \n" > $HOME/.custom_prompt
		echo -e "PROMPT_COMMAND=pre_prompt \n" >> $HOME/.custom_prompt
		echo -E PS1=\"$custom_prompt\" >> $HOME/.custom_prompt
	else
		echo -E PS1=\"$custom_prompt\" > $HOME/.custom_prompt
	fi
	source $HOME/.custom_prompt
fi
