Added the "visual identifier" concept to the vcs segment.

This commit is contained in:
Dominik Ritter 2015-12-18 00:47:37 +01:00
commit ac4502ca1f
3 changed files with 15 additions and 10 deletions

View file

@ -64,8 +64,8 @@ case $POWERLEVEL9K_MODE in
VCS_COMMIT_ICON $'\UE821 ' # 
VCS_BRANCH_ICON $'\UE220' # 
VCS_REMOTE_BRANCH_ICON ' '$'\UE804 ' # 
VCS_GIT_ICON $'\UE20E ' # 
VCS_HG_ICON $'\UE1C3 ' # 
VCS_GIT_ICON $'\UE20E ' # 
VCS_HG_ICON $'\UE1C3 ' # 
)
;;
'awesome-fontconfig')
@ -111,8 +111,8 @@ case $POWERLEVEL9K_MODE in
VCS_COMMIT_ICON $'\UF221 ' # 
VCS_BRANCH_ICON $'\UF126' # 
VCS_REMOTE_BRANCH_ICON ' '$'\UF204 ' # 
VCS_GIT_ICON $'\UF113 ' # 
VCS_HG_ICON $'\UF0C3 ' # 
VCS_GIT_ICON $'\UF113 ' # 
VCS_HG_ICON $'\UF0C3 ' # 
)
;;
*)

View file

@ -78,6 +78,12 @@ function +vi-hg-bookmarks() {
}
function +vi-vcs-detect-changes() {
if [[ "${hook_com[vcs]}" == "git" ]]; then
vcs_visual_identifier='VCS_GIT_ICON'
elif [[ "${hook_com[vcs]}" == "hg" ]]; then
vcs_visual_identifier='VCS_HG_ICON'
fi
if [[ -n "${hook_com[staged]}" ]] || [[ -n "${hook_com[unstaged]}" ]]; then
VCS_WORKDIR_DIRTY=true
else