Comment by godelski
2 hours ago
I use yazi a fair amount but I've also configured fzf to do it. There's a lot of tools to view the images, chafa is a good one.
This definitely should be improved but I honestly don't use fzf that much. I can fix it if you really need something but I'm sure you could find it in the docs or even an LLM could handle this. Requires you to define a few variables, lsd, bat, and chafa
$ echo $FZF_DEFAULT_OPTS
--ansi --preview "if file --mime-type {} | grep -qF image; then chafa --passthrough none -f sixels --size ${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES} {}; elif file --mime-type {} | grep -aF -e directory; then lsd --color always --icon always --almost-all --oneline --classify --long {}; elif file --mime-type {} | grep -aF -e binary; then strings {} | bat --color always --theme=Dracula --language c; elif file --mime-type {} | grep -aF -e text -e json -e empty; then bat --color always --theme=Dracula --style=numbers,grid --line-range :500 {}; fi"
No comments yet
Contribute on Hacker News ↗