# vim: set ts=4

# Turmio's Prompt Theme for bashish DR3+
# --------------------------------------
# Created by Tuomas Jormola <tjsgic.fi>.
# Feel free to send any comments you might have.

# Here's an example how it should look like,
# but in B&W. In real life it's all in colors.
# (16:52:09)(tj@shakti)(~/.bashish) $

# ChangeLog
# ---------
# v0.1 - Wed Dec 22 18:14:37 EET 1999
#       * Initial release.
# v0.2 - Wed Dec 22 20:31:05 EET 1999
#       * Fixed converting the format of number of a terminal
#         if the numbert was 0.
# v0.3 - Sat Dec 25 18:17:33 EET 1999
#       * Simplified the theme a lot by using $BASHISHDIR/modules/color
#         instaed of hard-coded values to display the colors.
#       * Also PS1 got reduced by almost 60 chars and still maintaining
#         the same look and behaviour as before.
# v0.4 - Sun Apr  2 10:26:02 EEST 2000
#       * Added support colorless prompt if using screen.
#       * Added support for "changetheme -a" descriptions.
#       * Added TODO section :)
#
# v0.5  * Updated to use themecompat (arne)
#
# v0.6  * Updated to the new color api (arne)
#       * Added font

# I don't know which font turmio were using but this seems to fit nice
XFONT=cure.pcf.gz


# Okay, Let's start.

# Theme info stuff.
THEME_AUTHOR="Tuomas Jormola <tj@sgic.fi>"
THEME_COMMENT="It's just another cool but still very usable prompt."
THEME_NAME="Turmio's Prompt"
THEME_VERSION="v0.4"

# Of course we want that as many people as possible are able
# to correctly view this theme. Only tested with bash-2.03, though.
needmod themecompat
# We want to display the number of current terminal at the title.
needmod number-base

# Under screen we don't want any colors.
if [ $TERM = "screen" ]; then
        # The Not-So Mighty Prompt String Number One.
        PS1="($t)($u@$h)($w)$b "
else
        # We're going to display some pretty colors.
        needmod color

        # Color configuration.
        # If you want to change the colors, just replace the options
        # after "showcolor" with your favourite colors.
        # To more gain information aboutall the options you can use here,
        # you can read $BASHISHDIR/modules/color module.
        # These are the colors that I like the best.
        CHAR_COLOR=`color fgblue bold`       # Used to color '(', ')' and '@'.
        TEXT_COLOR=`color fgwhite`        # I bet you can guess what this does.
        # Don't touch this variable.
        RESET=`color normal`

        # There's probably no need to change anything below this line.
        # But it's great fun to view, though.

        # The All Mighty Prompt String Number One.

PS1="$CHAR_COLOR($TEXT_COLOR$t$CHAR_COLOR)($TEXT_COLOR$u$CHAR_COLOR@$TEXT_COLOR$h$CHAR_COLOR)
($TEXT_COLOR$w$CHAR_COLOR)$b$RESET"
fi

# I prefer this kind of format for the number of terminal below 10.
# We need two different checks since if user changed to this theme twice or
# more during one session, ARABICNUMBER would get fux0red. In other words,
# we must check if ARABICNUMBER has been already converted from X to 0X.
[ "$ARABICNUMBER" = "0" -o $ARABICNUMBER -lt 10 -a "`echo $ARABICNUMBER | cut -b1-1`" != "0" ]&& ARABICNUMBER="0$ARABICNUMBER"

# Define The Titles.
TITLE='($ARABICNUMBER)(`hostname -s`)(`echo $PWD | sed s*$HOME*~*g`)'
SUPERTITLE='($ARABICNUMBER)(root shell)(`echo $PWD | sed s*$HOME*~*g`)'

# EOF
