Use the REVERSE variable to use black on white

Having to edit the liquidprompt.bash file to select a configuration is a
bad idea. Configuration shall be external to the file to avoid any
modification compared to the official version.

It is easy to pass paramaters to the script by using (in the present case):
$ REVERSE="1" source liquidprompt.bash
This commit is contained in:
Ludovic Rousseau 2012-07-31 10:01:40 +02:00
parent bf85104290
commit 833ab6b6cf

View File

@ -66,9 +66,8 @@ PATH_LENGTH=35
PATH_KEEP=2 PATH_KEEP=2
# Do we use reverse colors (black on white) instead of normal theme (white on black) # Do we use reverse colors (black on white) instead of normal theme (white on black)
# Defaults to 0 (normal colors) # Defaults to unset (white on black)
# set to 1 if you use black on white # Otherwise use REVERSE="1" source liquidprompt.bash
REVERSE=0
############### ###############
@ -150,7 +149,7 @@ fi
# can be set to white or black # can be set to white or black
FG=$WHITE FG=$WHITE
BOLD_FG=$BOLD_WHITE BOLD_FG=$BOLD_WHITE
if [[ $REVERSE == 1 ]] ; then if [[ $REVERSE ]] ; then
FG=$BLACK FG=$BLACK
BOLD_FG=$BOLD_GRAY BOLD_FG=$BOLD_GRAY
fi fi