Merge pull request #1456 from luukvbaal/preview-tui

Preview-tui fix image_preview stdout
This commit is contained in:
Arun 2022-08-07 21:30:23 +05:30 committed by GitHub
commit ad62463b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,6 @@ generate_preview() {
printf "%s" "$!" > "$PREVIEWPID" printf "%s" "$!" > "$PREVIEWPID"
return return
else else
exec >/dev/tty
image_preview "$1" "$2" "$3" image_preview "$1" "$2" "$3"
return return
fi ;; fi ;;
@ -405,6 +404,7 @@ generate_preview() {
image_preview() { image_preview() {
clear clear
exec >/dev/tty
if [ "$TERMINAL" = "kitty" ]; then if [ "$TERMINAL" = "kitty" ]; then
# Kitty terminal users can use the native image preview method # Kitty terminal users can use the native image preview method
kitty +kitten icat --silent --scale-up --place "$1"x"$2"@0x0 --transfer-mode=stream --stdin=no "$3" & kitty +kitten icat --silent --scale-up --place "$1"x"$2"@0x0 --transfer-mode=stream --stdin=no "$3" &