17 lines
492 B
Plaintext
17 lines
492 B
Plaintext
|
#!/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
|