๐Ÿ”’ Backup for my config files
dotfiles
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

rework fish right prompt to include the code forge

Kacaii 5bf42d4e 0df97e86

+29 -5
+27 -5
.config/fish/functions/fish_right_prompt.fish
··· 1 1 function fish_right_prompt 2 2 set -l vcs_color normal 3 + set -l vcs_icon "" 4 + set -l code_forge "" 3 5 4 - if command -q jj && test -e "$PWD/.jj" 6 + # ๏‚ JJ Root 7 + command -q jj; and set -l jj_root_dir \ 8 + ( jj root 2> /dev/null ) 9 + 10 + # ๎™ Git Root 11 + command -q git; and set -l git_root_dir \ 12 + ( git rev-parse --show-toplevel 2> /dev/null ) 13 + 14 + # Version control software 15 + if test -n "$jj_root_dir" 5 16 set vcs_color blue 6 - set icon (set_color $vcs_color) "๏‚" (set_color normal) 7 - else if command -q git && test -e "$PWD/.git" 17 + set vcs_icon (set_color $vcs_color ) "๏‚ " ( set_color normal ) 18 + else if test -n "$git_root_dir" 8 19 set vcs_color red 9 - set icon (set_color $vcs_color) "๎™" (set_color normal) 20 + set vcs_icon (set_color $vcs_color ) "๎™ " ( set_color normal ) 10 21 end 11 22 12 - echo -ns $icon (set_color $vcs_color) (fish_git_prompt) (set_color normal) 23 + # Code forge 24 + if test -e "$jj_root_dir/.tangled" 25 + set code_forge "๓ฐณ† " 26 + else if test -e "$jj_root_dir/.github" 27 + set code_forge "๎™› " 28 + end 29 + 30 + # Git prompt 31 + set -l commit_hash \ 32 + (set_color $vcs_color) (fish_git_prompt) (set_color normal) 33 + 34 + echo -ns $code_forge $vcs_icon $commit_hash 13 35 end
+2
.stow-local-ignore
··· 1 1 \.jj 2 2 \.git 3 + \.github 4 + \.tangled