dotfiles/.config/fish/functions/fish_prompt.fish

31 lines
809 B
Fish
Raw Normal View History

2025-11-05 14:30:26 +01:00
function fish_prompt
2025-12-30 16:39:08 +01:00
if not set -q VIRTUAL_ENV_DISABLE_PROMPT
2026-03-19 18:17:31 +01:00
set -g VIRTUAL_ENV_DISABLE_PROMPT true
end
set colorscheme (dconf read /org/gnome/desktop/interface/color-scheme)
if test $colorscheme = '\'prefer-light\''
set_color brwhite --background d5c4a1
else
set_color brwhite --background 504945
2025-12-30 16:39:08 +01:00
end
set -g __fish_git_prompt_show_informative_status true
printf '%s' (fish_git_prompt " %s ")
2025-12-30 16:27:17 +01:00
2026-03-19 18:17:31 +01:00
if test $colorscheme = '\'prefer-light\''
set_color white --background ebdbb2
else
set_color white --background 3c3836
end
2025-12-30 16:39:08 +01:00
printf ' %s ' (prompt_pwd -D 8)
echo
2025-12-30 16:27:17 +01:00
2025-12-30 16:39:08 +01:00
if test -n "$VIRTUAL_ENV"
2026-03-19 18:17:31 +01:00
printf "(%s) " (set_color blue)(path basename $VIRTUAL_ENV)(set_color normal)
2025-12-30 16:39:08 +01:00
end
set_color normal
echo
2025-09-06 23:01:45 +02:00
end