From 025554d79d9e67e6846095107a96f16cbe912ecf Mon Sep 17 00:00:00 2001 From: Saulius Gurklys Date: Sat, 6 Oct 2018 16:44:37 +0300 Subject: [PATCH] Add minimal HG prompt to powerline themes --- themes/powerline-multiline/powerline-multiline.theme.bash | 1 + themes/powerline-naked/powerline-naked.theme.bash | 1 + themes/powerline-plain/powerline-plain.theme.bash | 1 + themes/powerline/powerline.base.bash | 2 ++ themes/powerline/powerline.theme.bash | 1 + 5 files changed, 6 insertions(+) diff --git a/themes/powerline-multiline/powerline-multiline.theme.bash b/themes/powerline-multiline/powerline-multiline.theme.bash index a62a7060..5af4dba2 100644 --- a/themes/powerline-multiline/powerline-multiline.theme.bash +++ b/themes/powerline-multiline/powerline-multiline.theme.bash @@ -20,6 +20,7 @@ PYTHON_VENV_THEME_PROMPT_COLOR=35 SCM_NONE_CHAR="" SCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=" "} +SCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:="☿ "} SCM_THEME_PROMPT_CLEAN="" SCM_THEME_PROMPT_DIRTY="" SCM_THEME_PROMPT_CLEAN_COLOR=25 diff --git a/themes/powerline-naked/powerline-naked.theme.bash b/themes/powerline-naked/powerline-naked.theme.bash index 1897a6ba..08e2a1f5 100644 --- a/themes/powerline-naked/powerline-naked.theme.bash +++ b/themes/powerline-naked/powerline-naked.theme.bash @@ -16,6 +16,7 @@ PYTHON_VENV_THEME_PROMPT_COLOR=35 SCM_NONE_CHAR="" SCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=" "} +SCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:="☿ "} SCM_THEME_PROMPT_CLEAN="" SCM_THEME_PROMPT_DIRTY="" SCM_THEME_PROMPT_COLOR=238 diff --git a/themes/powerline-plain/powerline-plain.theme.bash b/themes/powerline-plain/powerline-plain.theme.bash index 53da88b4..cdcb3cc2 100644 --- a/themes/powerline-plain/powerline-plain.theme.bash +++ b/themes/powerline-plain/powerline-plain.theme.bash @@ -12,6 +12,7 @@ PYTHON_VENV_THEME_PROMPT_COLOR=35 SCM_NONE_CHAR="" SCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:="⎇ "} +SCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:="☿ "} SCM_THEME_PROMPT_CLEAN="" SCM_THEME_PROMPT_DIRTY="" SCM_THEME_PROMPT_CLEAN_COLOR=25 diff --git a/themes/powerline/powerline.base.bash b/themes/powerline/powerline.base.bash index ade246e9..78b6d710 100644 --- a/themes/powerline/powerline.base.bash +++ b/themes/powerline/powerline.base.bash @@ -86,6 +86,8 @@ function __powerline_scm_prompt { scm_prompt+="${SCM_CHAR}${SCM_BRANCH}${SCM_STATE}" elif [[ "${SCM_P4_CHAR}" == "${SCM_CHAR}" ]]; then scm_prompt+="${SCM_CHAR}${SCM_BRANCH}${SCM_STATE}" + elif [[ "${SCM_HG_CHAR}" == "${SCM_CHAR}" ]]; then + scm_prompt+="${SCM_CHAR}${SCM_BRANCH}${SCM_STATE}" fi echo "${scm_prompt}${scm}|${color}" fi diff --git a/themes/powerline/powerline.theme.bash b/themes/powerline/powerline.theme.bash index df72a73f..d3bb242a 100644 --- a/themes/powerline/powerline.theme.bash +++ b/themes/powerline/powerline.theme.bash @@ -15,6 +15,7 @@ PYTHON_VENV_THEME_PROMPT_COLOR=35 SCM_NONE_CHAR="" SCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=" "} +SCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:="☿ "} SCM_THEME_PROMPT_CLEAN="" SCM_THEME_PROMPT_DIRTY="" SCM_THEME_PROMPT_CLEAN_COLOR=25