aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions/icons.zsh19
-rw-r--r--functions/vcs.zsh15
2 files changed, 30 insertions, 4 deletions
diff --git a/functions/icons.zsh b/functions/icons.zsh
index 2920cfd5..53db5fa9 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -68,10 +68,15 @@ case $POWERLEVEL9K_MODE in
VCS_BRANCH_ICON $'\uE220' # 
VCS_REMOTE_BRANCH_ICON ' '$'\uE804 ' # 
VCS_GIT_ICON $'\uE20E ' # 
+ VCS_GIT_GITHUB_ICON $'\uE20E ' #
+ VCS_GIT_BITBUCKET_ICON $'\uE20E ' #
+ VCS_GIT_GITLAB_ICON $'\uE20E ' #
VCS_HG_ICON $'\uE1C3 ' # 
VCS_SVN_ICON '(svn) '
RUST_ICON ''
PYTHON_ICON $'\U1F40D' # 🐍
+ SWIFT_ICON ''
+ PUBLIC_IP_ICON ''
)
;;
'awesome-fontconfig')
@@ -121,11 +126,16 @@ case $POWERLEVEL9K_MODE in
VCS_COMMIT_ICON $'\uF221 ' # 
VCS_BRANCH_ICON $'\uF126' # 
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_SVN_ICON '(svn) '
RUST_ICON $'\uE6A8' # 
PYTHON_ICON $'\U1F40D' # 🐍
+ SWIFT_ICON ''
+ PUBLIC_IP_ICON ''
)
;;
*)
@@ -176,10 +186,15 @@ case $POWERLEVEL9K_MODE in
VCS_BRANCH_ICON $'\uE0A0 ' # 
VCS_REMOTE_BRANCH_ICON $'\u2192' # →
VCS_GIT_ICON ''
+ VCS_GIT_GITHUB_ICON ''
+ VCS_GIT_BITBUCKET_ICON ''
+ VCS_GIT_GITLAB_ICON ''
VCS_HG_ICON ''
VCS_SVN_ICON ''
- RUST_ICON ''
+ RUST_ICON ''
PYTHON_ICON ''
+ SWIFT_ICON 'Swift'
+ PUBLIC_IP_ICON ''
)
;;
esac
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index a0aa2b6c..5defa9bc 100644
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -62,7 +62,7 @@ function +vi-git-remotebranch() {
set_default POWERLEVEL9K_VCS_HIDE_TAGS false
function +vi-git-tagname() {
- if [[ "$POWERLEVE9K_VCS_HIDE_TAGS" == "false" ]]; then
+ if [[ "$POWERLEVEL9K_VCS_HIDE_TAGS" == "false" ]]; then
# If we are on a tag, append the tagname to the current branch string.
local tag
tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
@@ -110,7 +110,18 @@ function +vi-hg-bookmarks() {
function +vi-vcs-detect-changes() {
if [[ "${hook_com[vcs]}" == "git" ]]; then
- vcs_visual_identifier='VCS_GIT_ICON'
+
+ 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'
+ fi
+
elif [[ "${hook_com[vcs]}" == "hg" ]]; then
vcs_visual_identifier='VCS_HG_ICON'
elif [[ "${hook_com[vcs]}" == "svn" ]]; then