## stylish prompt by unknown
##
## bashishized and hacked a bit by arne :)
##
##
# .bash_prompt
#
# Command Prompt
#
######################################################################

#
# ANSI Escape Color
#
DULL=0
BRIGHT=1
#
FG_BLACK=30
FG_RED=31
FG_GREEN=32
FG_YELLOW=33
FG_BLUE=34
FG_VIOLET=35
FG_CYAN=36
FG_WHITE=37

FG_NULL=00

#
BG_BLACK=40
BG_RED=41
BG_GREEN=42
BG_YELLOW=43
BG_BLUE=44
BG_VIOLET=45
BG_CYAN=46
BG_WHITE=47

BG_NULL=00

#
# ANSI Escape Commands
#
ESC="\033"
NORMAL="\[$ESC[m\]"
RESET="\[$ESC[${DULL};${FG_WHITE};${BG_NULL}m\]"

#
# Shortcuts for Colored Text ( Bright and FG Only )
#
# DULL TEXT

BLACK="\[$ESC[${DULL};${FG_BLACK}m\]"
RED="\[$ESC[${DULL};${FG_RED}m\]"
GREEN="\[$ESC[${DULL};${FG_GREEN}m\]"
YELLOW="\[$ESC[${DULL};${FG_YELLOW}m\]"
BLUE="\[$ESC[${DULL};${FG_BLUE}m\]"
VIOLET="\[$ESC[${DULL};${FG_VIOLET}m\]"
CYAN="\[$ESC[${DULL};${FG_CYAN}m\]"
WHITE="\[$ESC[${DULL};${FG_WHITE}m\]"

# BRIGHT TEXT
BRIGHT_BLACK="\[$ESC[${BRIGHT};${FG_BLACK}m\]"
BRIGHT_RED="\[$ESC[${BRIGHT};${FG_RED}m\]"
BRIGHT_GREEN="\[$ESC[${BRIGHT};${FG_GREEN}m\]"
BRIGHT_YELLOW="\[$ESC[${BRIGHT};${FG_YELLOW}m\]"
BRIGHT_BLUE="\[$ESC[${BRIGHT};${FG_BLUE}m\]"
BRIGHT_VIOLET="\[$ESC[${BRIGHT};${FG_VIOLET}m\]"
BRIGHT_CYAN="\[$ESC[${BRIGHT};${FG_CYAN}m\]"
BRIGHT_WHITE="\[$ESC[${BRIGHT};${FG_WHITE}m\]"




######################################################################
#
# Prompt Info
#
# \a     an ASCII bell character (07)
# \d     the date in "Weekday Month Date" format (e.g., "Tue May 26")
# \e     an ASCII escape character (033)
# \h     the hostname up to the first `.'
# \H     the hostname
# \j     the number of jobs currently managed by the shell
# \l     the basename of the shell's terminal device name
# \n     newline
# \r     carriage return
# \s     the name of the shell, the basename of $0 (the portion following  the
#        final slash)
# \t     the current time in 24-hour HH:MM:SS format
# \T     the current time in 12-hour HH:MM:SS format
# \@     the current time in 12-hour am/pm format
# \u     the username of the current user
# \v     the version of bash (e.g., 2.00)
# \V     the release of bash, version + patchlevel (e.g., 2.00.0)
# \w     the current working directory
# \W     the basename of the current working directory
# \!     the history number of this command
# \#     the command number of this command
# \$     if the effective UID is 0, a #, otherwise a $
# \nnn   the character corresponding to the octal number nnn
# \\     a backslash
# \[     begin  a  sequence of non-printing characters, which could be used to
#        embed a terminal control sequence into the prompt
# \]     end a sequence of non-printing characters
#
######################################################################

PROMPT_COMMAND='export ERR=$?'

#put here you prompt settings checking $1

case "$1" in
-help|--help|-h)
WELCOMEMESSAGE="This prompt has the different styles:
use with changetheme stylish -scheme ice

-scheme ice (default)
-scheme fire
-scheme nature
-scheme sunshine
-scheme dream
-scheme magic
"
esac
## lets have som nice defaults!
#
# 'ice' prompt
#
##if [ "$1" = "ice" ];
##then

PS1="\n${BRIGHT_CYAN}/-=[ ${BRIGHT_WHITE}\t${BRIGHT_CYAN} ]-[ ${BRIGHT_WHITE}\d${BRIGHT_CYAN} ]-[${BRIGHT_WHITE}\j${BRIGHT_CYAN}]-[${BRIGHT_WHITE}\#${BRIGHT_CYAN}]-[${BRIGHT_RED}$(echo \$ERR)${BRIGHT_CYAN}]=-
${BRIGHT_CYAN}\-=[ ${BRIGHT_WHITE}\u${BRIGHT_CYAN}${WHITE}@${BRIGHT_WHITE}\h${BRIGHT_CYAN}:${BRIGHT_WHITE}\w${BRIGHT_CYAN} ]${NORMAL}\$ ${RESET}"
##
##fi

#
# 'fire' prompt
#
if [ "$2" = "fire" ];
then

PS1="\n${BRIGHT_RED}..::[ ${RED}b${BRIGHT_RED}A${BRIGHT_YELLOW}S${RED}h ${BRIGHT_RED}f${BRIGHT_YELLOW}I${BRIGHT_RED}r${RED}e ${RED}s${BRIGHT_RED}t${BRIGHT_YELLOW}Y${BRIGHT_RED}l${RED}e ${BRIGHT_RED}]-[${BRIGHT_YELLOW}$(echo \$ERR)${BRIGHT_RED}]::..
${BRIGHT_RED}..::[ ${BRIGHT_YELLOW}\u${RED}@${BRIGHT_YELLOW}\h${BRIGHT_RED}:${BRIGHT_YELLOW}\w${BRIGHT_RED} ]${BRIGHT_YELLOW}>${NORMAL} ${RESET}"

fi

#
# 'nature' prompt
#
if [ "$2" = "nature" ];
then

PS1="\n${BRIGHT_GREEN}.--~/ ${GREEN}b${BRIGHT_GREEN}a${GREEN}s${BRIGHT_GREEN}h ${GREEN}n${BRIGHT_GREEN}a${GREEN}t${BRIGHT_GREEN}u${GREEN}r${BRIGHT_GREEN}e ${GREEN}s${BRIGHT_GREEN}t${GREEN}y${BRIGHT_GREEN}l${GREEN}e${BRIGHT_GREEN} - [${BRIGHT_CYAN}$(echo \$ERR)${BRIGHT_GREEN}] \\~--.
${BRIGHT_GREEN}.--~/ ${YELLOW}\u${GREEN}@${YELLOW}\h${BRIGHT_GREEN}:${BRIGHT_CYAN}\w${BRIGHT_GREEN} ]${GREEN}\$${NORMAL} ${RESET}"

fi

#
# 'sunshine' prompt
#
if [ "$2" = "sunshine" ];
then

PS1="\n${BRIGHT_YELLOW}<--(${BRIGHT_RED}*${BRIGHT_YELLOW})--><--( ${BRIGHT_RED}$(echo \$ERR)${BRIGHT_YELLOW} )-->
${BRIGHT_YELLOW}<--( ${YELLOW}\u${BRIGHT_RED}@${YELLOW}\h${BRIGHT_YELLOW}:${BRIGHT_RED}\w${BRIGHT_YELLOW} )--${YELLOW}\$${NORMAL} ${RESET}"

fi

#
# 'dream' prompt
#
if [ "$2" = "dream" ];
then

PS1="${BRIGHT_VIOLET} _________
|${VIOLET}\\ ${BRIGHT_CYAN}DrEaM ${VIOLET}/${BRIGHT_VIOLET}|  ${BRIGHT_WHITE}Last Error Status: ${BRIGHT_RED}$(echo \$ERR)
${BRIGHT_VIOLET}|${VIOLET} \\ ${BRIGHT_CYAN}bOx ${VIOLET}/ ${BRIGHT_VIOLET}|  ${BRIGHT_WHITE} User: ${WHITE}\u  ${BRIGHT_WHITE}Host: ${WHITE}\h
${BRIGHT_VIOLET}|${VIOLET}  \\ ${BRIGHT_CYAN}. ${VIOLET}/  ${BRIGHT_VIOLET}|  ${BRIGHT_WHITE}  Current Working Directory: ${WHITE} \w
${BRIGHT_VIOLET}|___...-${BRIGHT_CYAN}\t ${BRIGHT_VIOLET}--${VIOLET}>${NORMAL} ${RESET}"

fi

#
# 'dream' prompt
#
if [ "$2" = "magic" ];
then
              
PS1="\n${BRIGHT_BLUE}._._  _. _ ${BRIGHT_WHITE}*${BRIGHT_BLUE} _ 
| | |(_|(_||(_ 
${BRIGHT_CYAN}`date +%k:%M`${BRIGHT_BLUE}    _| ${BRIGHT_VIOLET}Bash${BRIGHT_BLUE}-${BLUE}*${NORMAL} ${RESET}"    

fi

#
# Export Variables
#
## commented by arne ## export PS1 PROMPT_COMMAND
