feat: various cleans

This commit is contained in:
2026-07-20 18:29:12 +02:00
parent 4e02228264
commit f68a8d4158
6 changed files with 47 additions and 118 deletions
+36
View File
@@ -47,6 +47,20 @@ function fish_prompt --description 'Write out the prompt'
set color_cwd $fish_color_cwd
end
# Vim mode indicator
set -l vim_mode
switch $fish_bind_mode
case default
set vim_mode (set_color brwhite --bold)"N"(set_color normal)
case insert
set vim_mode (set_color green --bold)"I"(set_color normal)
case visual
set vim_mode (set_color yellow --bold)"V"(set_color normal)
case replace
set vim_mode (set_color red --bold)"R"(set_color normal)
end
echo -n $vim_mode" "
# Time
set_color brblack
echo -n (date '+%H:%M:%S')
@@ -79,6 +93,28 @@ function fish_prompt --description 'Write out the prompt'
set_color normal
echo -n ' '
# Dirh position: {back}< />{fwd} {back}<>{fwd}
set -l back (count $dirprev)
set -l fwd (count $dirnext)
if test $back -gt 0 -o $fwd -gt 0
set_color brblack
if test $back -gt 0
echo -n $back
end
if test $back -gt 0 -a $fwd -gt 0
echo -n "<>"
else if test $back -gt 0
echo -n "<"
else
echo -n ">"
end
if test $fwd -gt 0
echo -n $fwd
end
set_color normal
echo -n ' '
end
# PWD
set_color $color_cwd
echo -n (prompt_pwd)