feat: Use two line fish prompt

This commit is contained in:
Leni Aniva 2024-10-03 17:26:46 -07:00
parent c130537892
commit 1c49965dcb
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
2 changed files with 25 additions and 20 deletions

View File

@ -40,39 +40,52 @@ end
function fish_prompt function fish_prompt
# set_color white # set_color white
# echo -n '[' # printf '['
set -l FishStatusCodeCache $status set -l FishStatusCodeCache $status
set_color -o 00FF00 set_color -o 00FF00
echo -n (whoami) printf (whoami)
set_color normal set_color normal
echo -n '@' printf '@'
set_color AFD75F set_color AFD75F
echo -n (prompt_hostname) printf (prompt_hostname)
set_color white set_color white
echo -n ':' printf ':'
set_color 8787FF set_color 8787FF
echo -n (prompt_abbr $PWD) printf (prompt_abbr $PWD)
set -l vcs_prompt (fish_vcs_prompt)
if test -n "$vcs_prompt"
printf " "
set_color 5F87D7 set_color 5F87D7
echo -n (__fish_vcs_prompt) printf '\uf126'
printf (fish_vcs_prompt)
end
if test $FishStatusCodeCache -eq 0 if test $FishStatusCodeCache -eq 0
#set_color 18C412 #set_color 18C412
else else
set_color E84505 set_color E84505
echo -n " [$FishStatusCodeCache]" printf " [$FishStatusCodeCache]"
end end
# set_color white # set_color white
# echo -n "]" # printf "]"
set_color -o white set_color 999999
echo -n "> " printf " "
printf (date '+%Y/%m/%d %H:%M:%S')
printf "\n"
#set_color -o white
#printf "> "
set_color -o green
printf "⮀ "
set_color normal set_color normal
end end

View File

@ -1,8 +0,0 @@
#!/bin/fish
function fish_right_prompt
set_color grey
printf (date '+%H:%M:%S')
set_color normal
end