···1313 set -g dotfiles $HOME/dotfiles
1414 set -g tmux_config_file $HOME/.tmux.conf
15151616- # ๏ Read JJ current descriptin
1717- set -g JJ_DESCRIPTION ( get_jj_description )
1818-1916 # ๎ Git Prompt Customization
2017 set -g __fish_git_prompt_showdirtystate true
2118 set -g __fish_git_prompt_char_dirtystate "*"
···34313532 # ๓ฐฏ Fzf Setup
3633 command -q fzf; and fzf --fish | source; and set -gx FZF_DEFAULT_OPTS "\
3737- --color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \
3838- --color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \
3939- --color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \
4040- --color=selected-bg:#45475A \
4141- --color=border:#6C7086,label:#CDD6F4"
3434+ --color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \
3535+ --color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \
3636+ --color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \
3737+ --color=selected-bg:#45475A \
3838+ --color=border:#6C7086,label:#CDD6F4"
42394340end
+10-15
.config/fish/functions/fish_right_prompt.fish
···22 set -l vcs_color normal
33 set -l vcs_icon ""
44 set -l vcs_text ""
55- set -l jj_description ""
65 set -l code_forge ""
7687 # ๏ JJ Root
99- command -q jj; and set -l jj_root_dir \
1010- ( jj root 2> /dev/null )
88+ command -q jj
99+ and set -l jj_root_dir ( jj root 2> /dev/null )
11101211 # ๎ Git Root
1313- command -q git; and set -l git_root_dir \
1414- ( git rev-parse --show-toplevel 2> /dev/null )
1212+ command -q git
1313+ and set -l git_root_dir ( git rev-parse --show-toplevel 2> /dev/null )
15141615 # Version control software
1716 if test -n "$jj_root_dir"
1817 set vcs_color blue
1918 set vcs_icon (set_color $vcs_color ) "๏ " ( set_color normal )
2020- set jj_description ( get_jj_description )
2119 else if test -n "$git_root_dir"
2220 set vcs_color red
2321 set vcs_icon (set_color $vcs_color ) "๎ " ( set_color normal )
2422 end
25232624 # Code forge
2727- test -e "$jj_root_dir/.tangled"; and set code_forge "๓ฐณ "
2828- or test -e "$jj_root_dir/.github"; and set code_forge "๎ "
2525+ if test -e "$jj_root_dir/.tangled"
2626+ set code_forge "๓ฐณ "
2727+ else if test -e "$jj_root_dir/.github"
2828+ set code_forge "๎ "
2929+ end
29303031 # Git prompt
3132 set -l git_commit_hash (set_color $vcs_color) (fish_git_prompt) (set_color normal)
3232-3333- # Vcs text
3434- if test -n "$jj_root_dir"; and test -n "$jj_description"
3535- set vcs_text "๓ฐ $jj_description"
3636- else if test -n "$git_root_dir"
3737- set vcs_text $git_commit_hash
3838- end
3333+ set vcs_text $git_commit_hash
39344035 echo -ns $code_forge $vcs_icon $vcs_text
4136end
-11
.config/fish/functions/get_jj_description.fish
···11-function get_jj_description -d "Current commit description or empty string if none"
22- set -l jj_root_dir ""
33-44- command -q jj
55- and set -l jj_root_dir ( jj root 2> /dev/null )
66- and test -n "$jj_root_dir"
77- and echo "$(jj log -R $jj_root_dir -r @ -T "description" --no-graph)"
88-99- # Empty if it Fails
1010- or echo ""
1111-end