cleanup fifo

This commit is contained in:
Luuk van Baal 2021-03-14 15:28:50 +01:00
parent 519ea8347e
commit 7527125487
2 changed files with 8 additions and 2 deletions

View File

@ -209,7 +209,10 @@ ueberzug_refresh() {
preview_fifo &
wait
}
[ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug && trap 'ueberzug_refresh' WINCH
if [ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug; then
trap 'ueberzug_refresh' WINCH
trap 'rm "$FIFO_UEBERZUG"' INT HUP EXIT
fi
preview_fifo() {
# use cat instead of 'exec <' to avoid issues with dash shell

View File

@ -272,7 +272,10 @@ ueberzug_refresh() {
preview_fifo &
wait
}
[ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug && trap 'ueberzug_refresh' WINCH
if [ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug; then
trap 'ueberzug_refresh' WINCH
trap 'rm "$FIFO_UEBERZUG"' INT HUP EXIT
fi
preview_fifo() {
# use cat instead of 'exec <' to avoid issues with dash shell