Files
MinOS-prime/home/.config/fish/functions/image-preview.fish
2025-07-11 18:08:12 +03:00

10 lines
292 B
Fish

function image-preview
set image "$argv[1]"
# Retrieve the current terminal dimensions and reduce them slightly to avoid boundary issues
set term_width (math (tput cols) - 1)
set term_height (math (tput lines) - 1)
chafa "$image" --size="$term_width"x"$term_height"
end