# -- Thad's Bash
# -- dot.bash_profile V2.01
# -- Dec 13, 2004
source ~/.prompt/prompt_bsd.sh
source ~/.prompt/prompt_cygwin.sh
source ~/.prompt/prompt_linux.sh
source ~/.prompt/prompt_common.sh
source ~/.prompt/prompt_sunos.sh
source ~/.prompt/prompt_terms.sh

if [ "`uname`" = "FreeBSD" ]; 
then				# if this is BSD do bsd stuff
        bsd_setup
else
if [ "`uname`" = "Linux" ]
then				# if this is linux do linux stuff
        linux_setup
	crosdnsfix
	load_bw_keys
else
if [ -a /cygwin.bat ]
then				# if this cygwin do cygwin stuff
	cygwin_setup
else
if [ "`SunOS`" = "SunOS" ]
then
	sun_setup 
fi
fi
fi
fi

alias_setup

if [ "${XDG_DATA_DIRS}" == "" ]
then
	export XDG_DATA_DIRS=/usr/local/share:/usr/share
fi

[[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] && \
        source /usr/local/share/bash-completion/bash_completion.sh

case "$TERM" in

xterm-256color)
	colored_windowed_shell
	;;
xterm-color)
	colored_windowed_shell
	;;
Eterm)
	colored_windowed_shell
        ;;
putty)
	colored_windowed_shell
        ;;
xterm)
	colored_windowed_shell
	;;
dumb)
	tty_shell
	;;
sun)
	tty_shell
	;;
cons25)
	colored_tty_shell
	;;
vt100)
	colored_tty_shell
	;;
cygwin)
	colored_windowed_shell
	;;
linux)
	colored_tty_shell
	;;
*)
	tty_shell
	;;
esac
#export DISPLAY="192.168.0.5:0"

#if [ "$SSH_CLIENT" != "" ] && [ "$DISPLAY" = "" ]
#then
	#export DISPLAY="`env | grep SSH_CLIENT | cut -d = -f2 | cut -d \" \" -f1`:0"
#else
#	if [ "`uname -a | grep WSL`" != "" ]
#	then
		#export DISPLAY="`netstat -rn | grep UG | tr -s \" \" | cut -d \" \" -f2`:0"
#	fi
#fi

export OPENCV_LOG_LEVEL=0
export OPENCV_VIDEOIO_PRIORITY_INTEL_MFX=0

export ENV

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/tschulz/google-cloud-sdk/path.bash.inc' ]; then . '/home/tschulz/google-cloud-sdk/path.bash.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '/home/tschulz/google-cloud-sdk/completion.bash.inc' ]; then . '/home/tschulz/google-cloud-sdk/completion.bash.inc'; fi

if [ -f '/home/tschulz/.acme.sh/acme.sh.env' ]
then
	. "/home/tschulz/.acme.sh/acme.sh.env"
fi

source ~/.rcs/bash_prompt/bw/bw-common.sh

