aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-12-18 02:47:37 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-12-18 02:47:37 +0300
commitac4502ca1fafab54c07d22e4841d8c6c7aeffc95 (patch)
tree8638823eb9ac893b7afa523fcd116fda8be1f65d /functions
parent5cfd800585516ce2251cd4f4cf8f2e1dbadddc70 (diff)
Added the "visual identifier" concept to the `vcs` segment.
Diffstat (limited to 'functions')
-rw-r--r--functions/icons.zsh8
-rw-r--r--functions/vcs.zsh6
2 files changed, 10 insertions, 4 deletions
diff --git a/functions/icons.zsh b/functions/icons.zsh
index 4ba4811e..b8e02efd 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -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 ' # 
)
;;
*)
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index 39d0fdae..49dccc18 100644
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -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