feat(ytfzf): Kitty thumbnail previews
This commit is contained in:
parent
deb24af254
commit
6dc6f2acae
3
.config/ytfzf/conf.sh
Normal file
3
.config/ytfzf/conf.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
thumbnail_viewer=./thumbnail-viewers/kitty-viewer
|
16
.config/ytfzf/thumbnail-viewers/kitty-viewer
Executable file
16
.config/ytfzf/thumbnail-viewers/kitty-viewer
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/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
|
Loading…
Reference in New Issue
Block a user