22 lines
478 B
Bash
Executable File
22 lines
478 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
file=$1
|
|
w=$2
|
|
h=$3
|
|
x=$4
|
|
y=$5
|
|
|
|
filetype="$( file -Lb --mime-type "$file")"
|
|
|
|
if [[ "$filetype" =~ ^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
|
|
|
|
if [[ "$filetype" =~ ^video ]]; then
|
|
kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$(vidthumb "$file")" < /dev/null > /dev/tty
|
|
exit 1
|
|
fi
|
|
|
|
pistol "$file"
|