From 1ca301e09e3a5648ff8927da4408f268a55127e7 Mon Sep 17 00:00:00 2001 From: rek Date: Thu, 11 Apr 2024 22:48:02 -0400 Subject: [PATCH] add icon for github.com and if no remote is specified --- functions/_tide_item_git.fish | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/functions/_tide_item_git.fish b/functions/_tide_item_git.fish index a1ae3fc..7fba462 100644 --- a/functions/_tide_item_git.fish +++ b/functions/_tide_item_git.fish @@ -61,8 +61,17 @@ function _tide_item_git set -g tide_git_bg_color $tide_git_bg_color_unstable end + # Icon for github if remote is set as github.com + if git remote -v | grep "git@github.com" >/dev/null + set -g tide_git_remote_icon "  " + else if test $(git remote -v | wc -l) -eq 0 + set -g tide_git_remote_icon " 󰅛 " + else + set -g tide_git_remote_icon "" + end + if set -q tide_git_icon_true - _tide_print_item git $_tide_location_color$tide_git_icon' ' (set_color white; echo -ns $location $tide_git_icon_spacer + _tide_print_item git $_tide_location_color$tide_git_remote_icon$tide_git_icon' ' (set_color white; echo -ns $location $tide_git_icon_spacer set_color $tide_git_color_operation; echo -ns ' '$operation ' '$step/$total_steps set_color $tide_git_color_upstream; echo -ns $tide_git_icon_upstream_behind$behind tide_git_icon_upstream_ahead$ahead set_color $tide_git_color_stash; echo -ns $tide_git_icon_stash$stash