Allow setting the color on the virtualenv display

This commit is contained in:
cyli 2013-04-21 14:17:18 -07:00
parent f483697fda
commit ffa3e894bc
2 changed files with 6 additions and 1 deletions

View File

@ -96,6 +96,9 @@ LP_COLOR_DISCHARGING_UNDER="$RED" # discharging and under threshold
# Time
LP_COLOR_TIME="$BLUE"
# Virtualenv
LP_COLOR_VIRTUALENV="$CYAN"
# Color maps (battery and load levels)
# Range from 0 (nothing special) to 9 (alert)
LP_COLORMAP_0=""

View File

@ -597,7 +597,9 @@ _lp_permissions_color()
_lp_virtualenv()
{
[[ "$LP_ENABLE_VIRTUALENV" != 1 ]] && return
[[ -n "$VIRTUAL_ENV" ]] && echo "[$(basename $VIRTUAL_ENV)]"
if [[ -n "$VIRTUAL_ENV" ]]; then
echo "[${LP_COLOR_VIRTUALENV}$(basename $VIRTUAL_ENV)${NO_COL}]"
fi
}