Add in_toolbox prompt to powerline themes

[Toolbox](https://github.com/containers/toolbox) is an containerized
development environment. This commit adds a promot to powerline when it
is running inside a toolbox.
This commit is contained in:
Kan Li
2020-11-28 12:05:36 -08:00
parent 13deafbb1b
commit 8ce9d8daa5
12 changed files with 41 additions and 5 deletions

View File

@@ -169,6 +169,12 @@ function __powerline_aws_profile_prompt() {
fi
}
function __powerline_in_toolbox_prompt() {
if [[ -e /run/.toolboxenv ]]; then
echo "${IN_TOOLBOX_THEME_PROMPT_TEXT}|${IN_TOOLBOX_THEME_PROMPT_COLOR}"
fi
}
function __powerline_shlvl_prompt() {
if [[ "${SHLVL}" -gt 1 ]]; then
local prompt="${SHLVL_THEME_PROMPT_CHAR}"