Preview-tui fix winch_handler

This commit is contained in:
Luuk van Baal 2021-05-18 11:20:56 +02:00 committed by Arun Prakash Jana
parent 2bd72d1b29
commit b89c32b9fa
No known key found for this signature in database
GPG Key ID: A75979F35C080412
2 changed files with 8 additions and 4 deletions

View File

@ -274,8 +274,10 @@ ueberzug_remove() {
winch_handler() {
clear
kill "$(cat "$IMGPID")" "$(cat "$PAGERPID")"
pkill -P "$$"
if [ -p "$FIFO_UEBERZUG" ]; then tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json & fi
if [ -p "$FIFO_UEBERZUG" ]; then
pkill -P "$$"
tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
fi
cat "$CURSEL" > "$NNN_FIFO"
preview_file "$(cat "$CURSEL")"
preview_fifo &

View File

@ -373,8 +373,10 @@ ueberzug_remove() {
winch_handler() {
clear
kill "$(cat "$IMGPID")" "$(cat "$PAGERPID")"
pkill -P "$$"
if [ -p "$FIFO_UEBERZUG" ]; then tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json & fi
if [ -p "$FIFO_UEBERZUG" ]; then
pkill -P "$$"
tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
fi
cat "$CURSEL" > "$NNN_FIFO"
preview_file "$(cat "$CURSEL")"
preview_fifo &