From 1c49965dcb0a9a347d298a4c427f822f23db1733 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Thu, 3 Oct 2024 17:26:46 -0700 Subject: [PATCH] feat: Use two line fish prompt --- fish/functions/fish_prompt.fish | 37 ++++++++++++++++++--------- fish/functions/fish_right_prompt.fish | 8 ------ 2 files changed, 25 insertions(+), 20 deletions(-) delete mode 100755 fish/functions/fish_right_prompt.fish diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish index 75b7a95..dbf199e 100755 --- a/fish/functions/fish_prompt.fish +++ b/fish/functions/fish_prompt.fish @@ -40,39 +40,52 @@ end function fish_prompt # set_color white -# echo -n '[' +# printf '[' set -l FishStatusCodeCache $status set_color -o 00FF00 - echo -n (whoami) + printf (whoami) set_color normal - echo -n '@' + printf '@' set_color AFD75F - echo -n (prompt_hostname) + printf (prompt_hostname) set_color white - echo -n ':' + printf ':' set_color 8787FF - echo -n (prompt_abbr $PWD) + printf (prompt_abbr $PWD) - set_color 5F87D7 - echo -n (__fish_vcs_prompt) + set -l vcs_prompt (fish_vcs_prompt) + if test -n "$vcs_prompt" + printf " " + set_color 5F87D7 + printf '\uf126' + printf (fish_vcs_prompt) + end if test $FishStatusCodeCache -eq 0 #set_color 18C412 else set_color E84505 - echo -n " [$FishStatusCodeCache]" + printf " [$FishStatusCodeCache]" end # set_color white -# echo -n "]" +# printf "]" - set_color -o white - echo -n "> " + set_color 999999 + printf " " + printf (date '+%Y/%m/%d %H:%M:%S') + printf "\n" + + #set_color -o white + #printf "> " + + set_color -o green + printf "⮀ " set_color normal end diff --git a/fish/functions/fish_right_prompt.fish b/fish/functions/fish_right_prompt.fish deleted file mode 100755 index 4fd2d57..0000000 --- a/fish/functions/fish_right_prompt.fish +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/fish - -function fish_right_prompt - set_color grey - printf (date '+%H:%M:%S') - set_color normal -end -