fish: a bit fancier starship prompt

This commit is contained in:
Daniel Lundin 2024-03-26 00:41:11 +01:00
parent fab020b373
commit 5cc5e1ff8e
4 changed files with 57 additions and 14 deletions

View file

@ -4,9 +4,15 @@ set fish_greeting
fish_add_path $HOME/.cargo/bin
fish_add_path $HOME/bin
if status is-interactive
export LESS="--mouse --wheel-lines=1 -nRXF"
export LESSCOLORIZER="bat"
export LESSOPEN="|lesspipe.sh %s"
export PAGER="bat"
export BAT_PAGER="less -r"
## Utilities
function tree
@ -30,6 +36,11 @@ if status is-interactive
end
bind \cg jump
## Kubernetes
fish_add_path $HOME/.krew/bin
function kubectl --wraps kubectl
command grc --colour=on kubectl $argv
end
## History

View file

@ -26,6 +26,8 @@ SETUVAR fish_color_selection:\x2d\x2dbackground\x3d313244
SETUVAR fish_color_status:f38ba8
SETUVAR fish_color_user:94e2d5
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_cursor_default:line
SETUVAR fish_cursor_normal:line
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_background:\x1d
SETUVAR fish_pager_color_completion:cdd6f4
@ -40,4 +42,4 @@ SETUVAR fish_pager_color_selected_background:\x1d
SETUVAR fish_pager_color_selected_completion:\x1d
SETUVAR fish_pager_color_selected_description:\x1d
SETUVAR fish_pager_color_selected_prefix:\x1d
SETUVAR fish_user_paths:/home/dln/bin\x1e/home/dln/\x2ecargo/bin
SETUVAR fish_user_paths:/home/dln/\x2ekrew/bin\x1e/home/dln/bin\x1e/home/dln/\x2ecargo/bin

View file

@ -3,33 +3,61 @@
add_newline = true
format = """\
${custom.pwd}\
$fill\
$line_break\
$directory\
($character)\
"""
right_format = """\
$git_status$git_state$git_branch$git_commit
$hostname"""
$cmd_duration\
$git_branch$git_commit$git_status$git_state\
$hostname\
"""
[hostname]
ssh_only = false
format = " [](fg:#333333)[ $hostname ](italic dimmed bg:#333333)"
format = " [](fg:#222222)[ $hostname ](italic dimmed bg:#222222 fg:#999999)"
disabled = false
[time]
disabled = false
format = ' [$time]($style)'
style = "italic dimmed fg:#666666"
time_format = '%R'
[custom.pwd]
command = "pwd"
when = true
format = "[($output)]($style) "
style = "italic dimmed fg:#777777"
[directory]
fish_style_pwd_dir_length = 1
truncation_length = 1
truncate_to_repo = false
truncation_symbol = "…"
style = "italic dimmed"
style = "italic fg:#88aabb"
[line_break]
disabled = false
[fill]
symbol = '⎯'
style = 'fg:#333333'
[character]
success_symbol = "[%](bold)"
success_symbol = "[%](bold fg:#66cc99)"
error_symbol = "[%](bold red)"
[cmd_duration]
min_time = 500
format = '[󱦟 $duration ](yellow)'
[git_branch]
format = "[$symbol$branch]($style)"
style = "italic bold fg:#00d992"
style = "italic bold fg:#00ac73"
symbol = " "
truncation_length = 16
truncation_symbol = ""
@ -43,8 +71,8 @@ style = ""
[git_status]
format = '([$all_status$ahead_behind]($style)) '
style = "fg:#00d992"
modified = "[ 󰦒](fg:#FFEE58)"
deleted = "[ ✘](fg:#FF5722)"
untracked = "[ ?](fg:#CE93D8)"
staged = "[ 󰐖](fg:#80DEEA)"
style = "fg:#00ac73"
modified = "[ 󰦒](fg:#d1c000)"
deleted = "[ ✘](fg:#b93400)"
untracked = "[ ?](fg:#9c49aa)"
staged = "[ 󰐖](fg:#71a4aa)"

View file

@ -1,6 +1,6 @@
[core]
excludesfile = "~/.gitignore"
pager = delta
pager = delta
compression = 3
looseCompression = 3
@ -105,6 +105,8 @@ date = relative
line-numbers = true
max-line-distance = 0.9
[hub]
protocol = git