diff --git a/liquidprompt b/liquidprompt index 68031a6..f556eb4 100755 --- a/liquidprompt +++ b/liquidprompt @@ -268,6 +268,7 @@ _lp_source_config() LP_ENABLE_RUNTIME=${LP_ENABLE_RUNTIME:-0} fi LP_ENABLE_VIRTUALENV=${LP_ENABLE_VIRTUALENV:-1} + LP_ENABLE_SCLS=${LP_ENABLE_SCLS:-1} LP_ENABLE_VCS_ROOT=${LP_ENABLE_VCS_ROOT:-0} LP_ENABLE_TITLE=${LP_ENABLE_TITLE:-0} LP_ENABLE_SCREEN_TITLE=${LP_ENABLE_SCREEN_TITLE:-0} @@ -1563,6 +1564,13 @@ _lp_set_prompt() LP_VENV= fi + # Display the current software collections enabled, if available + if [[ "$LP_ENABLE_SCLS,$X_SCLS" = 1,?* ]] ; then + LP_SCLS=" [${LP_COLOR_VIRTUALENV}${X_SCLS%"${X_SCLS##*[![:space:]]}"}${NO_COL}]" + else + LP_SCLS= + fi + LP_RUNTIME=$(_lp_sl "$(_lp_runtime)") # if change of working directory @@ -1662,7 +1670,7 @@ _lp_set_prompt() # add user, host and permissions colon PS1="${PS1}${LP_BRACKET_OPEN}${LP_USER}${LP_HOST}${LP_PERM}" - PS1="${PS1}${LP_PWD}${LP_BRACKET_CLOSE}${LP_VENV}${LP_PROXY}" + PS1="${PS1}${LP_PWD}${LP_BRACKET_CLOSE}${LP_SCLS}${LP_VENV}${LP_PROXY}" # Add VCS infos # If root, the info has not been collected unless LP_ENABLE_VCS_ROOT diff --git a/liquidpromptrc-dist b/liquidpromptrc-dist index d47c338..73376d4 100644 --- a/liquidpromptrc-dist +++ b/liquidpromptrc-dist @@ -111,6 +111,10 @@ LP_RUNTIME_THRESHOLD=2 # Recommended value is 1 LP_ENABLE_VIRTUALENV=1 +# Display the enabled software collections, if any +# Recommended value is 1 +LP_ENABLE_SCLS=1 + # Show average system temperature LP_ENABLE_TEMP=1