fzf improvements

This commit is contained in:
punkfairie 2024-02-10 18:48:15 -08:00
parent 8e0e6f56ce
commit 6128f92326
No known key found for this signature in database
GPG key ID: 0858B0F48128A755
4 changed files with 22 additions and 6 deletions

View file

@ -62,3 +62,5 @@ dotfile repos:
[signing-git-commits](https://gist.github.com/phortuin/cf24b1cca3258720c71ad42977e1ba57) [signing-git-commits](https://gist.github.com/phortuin/cf24b1cca3258720c71ad42977e1ba57)
[Correct_GnuPG_Permission](https://gist.github.com/oseme-techguy/bae2e309c084d93b75a9b25f49718f85) [Correct_GnuPG_Permission](https://gist.github.com/oseme-techguy/bae2e309c084d93b75a9b25f49718f85)
[A Practical Guide to fzf](https://thevaluable.dev/practical-guide-fzf-example/)

15
cli/fzf.config.fish Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env fish
set -gx FZF_DEFAULT_CMD 'rg --files --hidden --glob "!.git"'
set -gx FZF_DEFAULT_OPTS "\
--margin=10%,5% \
--border=sharp \
--pointer=' ' \
--marker=' ' \
--prompt=' ' \
--preview-label-pos='bottom' \
--preview-window='border-sharp' \
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"

View file

@ -0,0 +1,5 @@
#!/usr/bin/env fish
function fm --wraps=fzf -d "Use fzf as a simple file viewer"
find . -type d | fzf --preview='eza --color=always -T {} | head -n 50'
end

View file

@ -9,9 +9,3 @@ set -g man_underline -u f5c2e7 magenta
# Starship # Starship
set -gx STARSHIP_CONFIG "$DOT/fish/starship.toml" set -gx STARSHIP_CONFIG "$DOT/fish/starship.toml"
starship init fish | source starship init fish | source
# fzf
set -Ux FZF_DEFAULT_OPTS "\
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"