feat: various cleans
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -16,7 +16,6 @@ function git-refresh --on-variable PWD \
|
||||
if test -f $fetch_head
|
||||
set --local age (math (date +%s) - (stat -c %Y $fetch_head 2>/dev/null; or stat -f %m $fetch_head))
|
||||
if test $age -lt $GIT_REFRESH_TIMEOUT
|
||||
echo -e "\e[1m(git-refresh) - Cooldown: "(math $GIT_REFRESH_TIMEOUT - $age)"s remaining\e[0m"
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
function hn --description "Registra e trascrive voce in testo (Hns wrapper)"
|
||||
HNS_LANG=it HNS_WHISPER_MODEL=medium hns
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
function omo -d "Lancia opencode con la configurazione omo"
|
||||
set -lx OPENCODE_CONFIG ~/.config/omo/opencode.jsonc
|
||||
set -lx OPENCODE_TUI_CONFIG ~/.config/omo/tui.json
|
||||
set -lx XDG_DATA_HOME ~/.local/share/omo
|
||||
opencode $argv
|
||||
end
|
||||
Reference in New Issue
Block a user