mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
Merge pull request #360 from davidmpaz/icon_by_repo
Display different icons depending on remote type in VCS segment.
This commit is contained in:
commit
3a3238444d
2 changed files with 23 additions and 3 deletions
|
@ -68,6 +68,9 @@ case $POWERLEVEL9K_MODE in
|
||||||
VCS_BRANCH_ICON $'\uE220' #
|
VCS_BRANCH_ICON $'\uE220' #
|
||||||
VCS_REMOTE_BRANCH_ICON ' '$'\uE804 ' #
|
VCS_REMOTE_BRANCH_ICON ' '$'\uE804 ' #
|
||||||
VCS_GIT_ICON $'\uE20E ' #
|
VCS_GIT_ICON $'\uE20E ' #
|
||||||
|
VCS_GIT_GITHUB_ICON $'\uE20E ' #
|
||||||
|
VCS_GIT_BITBUCKET_ICON $'\uE20E ' #
|
||||||
|
VCS_GIT_GITLAB_ICON $'\uE20E ' #
|
||||||
VCS_HG_ICON $'\uE1C3 ' #
|
VCS_HG_ICON $'\uE1C3 ' #
|
||||||
VCS_SVN_ICON '(svn) '
|
VCS_SVN_ICON '(svn) '
|
||||||
RUST_ICON ''
|
RUST_ICON ''
|
||||||
|
@ -122,7 +125,10 @@ case $POWERLEVEL9K_MODE in
|
||||||
VCS_COMMIT_ICON $'\uF221 ' #
|
VCS_COMMIT_ICON $'\uF221 ' #
|
||||||
VCS_BRANCH_ICON $'\uF126' #
|
VCS_BRANCH_ICON $'\uF126' #
|
||||||
VCS_REMOTE_BRANCH_ICON ' '$'\uF204 ' #
|
VCS_REMOTE_BRANCH_ICON ' '$'\uF204 ' #
|
||||||
VCS_GIT_ICON $'\uF113 ' #
|
VCS_GIT_ICON $'\uF1D3 ' #
|
||||||
|
VCS_GIT_GITHUB_ICON $'\uF113 ' #
|
||||||
|
VCS_GIT_BITBUCKET_ICON $'\uF171 ' #
|
||||||
|
VCS_GIT_GITLAB_ICON $'\uF296 ' #
|
||||||
VCS_HG_ICON $'\uF0C3 ' #
|
VCS_HG_ICON $'\uF0C3 ' #
|
||||||
VCS_SVN_ICON '(svn) '
|
VCS_SVN_ICON '(svn) '
|
||||||
RUST_ICON $'\uE6A8' #
|
RUST_ICON $'\uE6A8' #
|
||||||
|
@ -178,6 +184,9 @@ case $POWERLEVEL9K_MODE in
|
||||||
VCS_BRANCH_ICON $'\uE0A0 ' #
|
VCS_BRANCH_ICON $'\uE0A0 ' #
|
||||||
VCS_REMOTE_BRANCH_ICON $'\u2192' # →
|
VCS_REMOTE_BRANCH_ICON $'\u2192' # →
|
||||||
VCS_GIT_ICON ''
|
VCS_GIT_ICON ''
|
||||||
|
VCS_GIT_GITHUB_ICON ''
|
||||||
|
VCS_GIT_BITBUCKET_ICON ''
|
||||||
|
VCS_GIT_GITLAB_ICON ''
|
||||||
VCS_HG_ICON ''
|
VCS_HG_ICON ''
|
||||||
VCS_SVN_ICON ''
|
VCS_SVN_ICON ''
|
||||||
RUST_ICON ''
|
RUST_ICON ''
|
||||||
|
|
|
@ -110,7 +110,18 @@ function +vi-hg-bookmarks() {
|
||||||
|
|
||||||
function +vi-vcs-detect-changes() {
|
function +vi-vcs-detect-changes() {
|
||||||
if [[ "${hook_com[vcs]}" == "git" ]]; then
|
if [[ "${hook_com[vcs]}" == "git" ]]; then
|
||||||
|
|
||||||
|
local remote=`git ls-remote --get-url`
|
||||||
|
if [[ "$remote" =~ "github" ]] then
|
||||||
|
vcs_visual_identifier='VCS_GIT_GITHUB_ICON'
|
||||||
|
elif [[ "$remote" =~ "bitbucket" ]] then
|
||||||
|
vcs_visual_identifier='VCS_GIT_BITBUCKET_ICON'
|
||||||
|
elif [[ "$remote" =~ "gitlab" ]] then
|
||||||
|
vcs_visual_identifier='VCS_GIT_GITLAB_ICON'
|
||||||
|
else
|
||||||
vcs_visual_identifier='VCS_GIT_ICON'
|
vcs_visual_identifier='VCS_GIT_ICON'
|
||||||
|
fi
|
||||||
|
|
||||||
elif [[ "${hook_com[vcs]}" == "hg" ]]; then
|
elif [[ "${hook_com[vcs]}" == "hg" ]]; then
|
||||||
vcs_visual_identifier='VCS_HG_ICON'
|
vcs_visual_identifier='VCS_HG_ICON'
|
||||||
elif [[ "${hook_com[vcs]}" == "svn" ]]; then
|
elif [[ "${hook_com[vcs]}" == "svn" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue