dotfiles/.config/lf/lf_kitty_preview
RafayAhmad7548 62dab95e70 created
2024-06-16 16:56:18 +05:00

13 lines
264 B
Bash
Executable file

#!/usr/bin/env bash
file=$1
w=$2
h=$3
x=$4
y=$5
if [[ "$( file -Lb --mime-type "$file")" =~ ^image ]]; then
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$file" < /dev/null > /dev/tty
exit 1
fi
pistol "$file"