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

Configure Feed

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

add `fish_jj_prompt` function

+23 -28
+1 -7
.config/fish/conf.d/integrations.fish
··· 4 4 command -q keychain; and eval "$(keychain --quiet --eval github tangled)" 5 5 command -q zoxide; and zoxide init fish | source 6 6 command -q batman; and batman --export-env | source 7 - command -q fzf; and fzf --fish | source; and set -gx FZF_DEFAULT_OPTS "\ 8 - --color=bg+:#313244,spinner:#F5E0DC,hl:#F38BA8 \ 9 - --color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \ 10 - --color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \ 11 - --color=selected-bg:#45475A \ 12 - --color=border:#6C7086,label:#CDD6F4 \ 13 - --preview='bat --color=always {}'" 7 + command -q fzf; and fzf --fish | FZF_ALT_C_COMMAND="" source 14 8 15 9 end
+21
.config/fish/functions/fish_jj_prompt.fish
··· 1 + function fish_jj_prompt 2 + command -sq jj; or return 1 3 + 4 + set -l info "$( 5 + jj log 2>/dev/null --no-graph --ignore-working-copy --color=always \ 6 + --revisions @ --template ' 7 + separate(" ", 8 + if(conflict, label("conflict", "conflict")), 9 + if(divergent, label("divergent", "divergent")), 10 + if(parents.len() > 1, label("merge", "merged")), 11 + change_id.shortest(6), 12 + commit_id.shortest(6), 13 + bookmarks, 14 + ) 15 + ' 16 + )" 17 + or return 1 18 + if test -n "$info" 19 + echo -ns $info 20 + end 21 + end
+1 -21
.config/fish/functions/fish_prompt.fish
··· 6 6 set status_color red 7 7 end 8 8 9 - # jj-vcs module ------------------------------------------------------------ 10 - set -l jj_module 11 - if test -e ".jj" 12 - 13 - # Templates 14 - set -l jj_change_id 'change_id.shortest(6)' 15 - set -l jj_commit_id 'commit_id.shortest(6)' 16 - set -l jj_description 'truncate_end(29, description.first_line(), "โ€ฆ")' 17 - set -l jj_bookmark bookmarks 18 - 19 - set -l jj_template \ 20 - ( string join ' ++ " " ++ ' -- \ 21 - $jj_change_id $jj_commit_id $jj_description $jj_bookmark ) 22 - 23 - set jj_module \ 24 - ( jj log -r @ --no-graph --color always --limit 1 -T \ 25 - $jj_template --ignore-working-copy ) 26 - 27 - end 28 - 29 9 # working directory -------------------------------------------------------- 30 10 set -l pwd_module \ 31 11 (set_color blue) (prompt_pwd) (set_color normal) ··· 35 15 set icon_module (set_color green) "๓ฐ†ง" (set_color normal) 36 16 37 17 # prompt 38 - echo -s $pwd_module " " $jj_module 18 + echo -s $pwd_module " " (fish_jj_prompt) 39 19 echo -ns $icon_module " " $arrow_module " " 40 20 end