Dot_Files/.config/ytfzf/thumbnail-viewers/kitty-viewer
2022-02-16 00:53:16 -06:00

17 lines
492 B
Bash
Executable File

#!/bin/bash
action="$1"
case "$action" in
start)
command -v "kitty" &>/dev/null || die 3 "\nkitty is not installed\n"
;;
view)
kitty +kitten icat --clear --transfer-mode file
Y_POSITION_ICAT="${4}"
Y_POSITION_ICAT=$(( Y_POSITION_ICAT * 2 ))
kitty +kitten icat --place "${5}x${6}@${3}x${Y_POSITION_ICAT}" --scale-up --transfer-mode file "$2"
;;
no-img) kitty +kitten icat --clear --transfer-mode file ;;
stop) : ;;
esac