Skip to content

Commit

Permalink
Add icons for git item
Browse files Browse the repository at this point in the history
  • Loading branch information
johnr14 committed Apr 9, 2024
1 parent c44b9f8 commit 3a6a0eb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
27 changes: 19 additions & 8 deletions functions/_tide_item_git.fish
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,23 @@ function _tide_item_git
set -g tide_git_bg_color $tide_git_bg_color_unstable
end

_tide_print_item git $_tide_location_color$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
set_color $tide_git_color_conflicted; echo -ns $tide_git_icon_conflicted$conflicted
set_color $tide_git_color_staged; echo -ns $tide_git_icon_staged$staged
set_color $tide_git_color_dirty; echo -ns $tide_git_icon_dirty$dirty
set_color $tide_git_color_untracked; echo -ns $tide_git_icon_untracked$untracked)
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
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
set_color $tide_git_color_conflicted; echo -ns $tide_git_icon_conflicted$conflicted
set_color $tide_git_color_staged; echo -ns $tide_git_icon_staged$staged
set_color $tide_git_color_dirty; echo -ns $tide_git_icon_dirty$dirty
set_color $tide_git_color_untracked; echo -ns $tide_git_icon_untracked$untracked)
else
_tide_print_item git $_tide_location_color$tide_git_icon' ' (set_color white; echo -ns $location
set_color $tide_git_color_operation; echo -ns ' '$operation ' '$step/$total_steps
set_color $tide_git_color_upstream; echo -ns ''$behind ''$ahead
set_color $tide_git_color_stash; echo -ns ' *'$stash
set_color $tide_git_color_conflicted; echo -ns ' ~'$conflicted
set_color $tide_git_color_staged; echo -ns ' +'$staged
set_color $tide_git_color_dirty; echo -ns ' !'$dirty
set_color $tide_git_color_untracked; echo -ns ' ?'$untracked)
end
end
2 changes: 2 additions & 0 deletions functions/tide/configure/choices/all/icons.fish
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function _enable_icons
set -g fake_tide_pwd_icon_home 
set -g fake_tide_cmd_duration_icon 
set -g fake_tide_git_icon 
set -g fake_tide_git_icon_true true
set -g fake_tide_git_icon_spacer ''
set -g fake_tide_git_icon_upstream_behind ⇣
set -g fake_tide_git_icon_upstream_ahead ⇡
Expand All @@ -38,6 +39,7 @@ function _disable_icons
set -g fake_tide_pwd_icon_home
set -g fake_tide_cmd_duration_icon
set -g fake_tide_git_icon
set -e fake_tide_git_icon_true
set -g fake_tide_git_icon_spacer ' '
set -g fake_tide_git_icon_upstream_behind ⇣
set -g fake_tide_git_icon_upstream_ahead ⇡
Expand Down

0 comments on commit 3a6a0eb

Please sign in to comment.