Skip to content

Commit

Permalink
Merge pull request #877 from luukvbaal/preview-tui
Browse files Browse the repository at this point in the history
cleanup fifo
  • Loading branch information
jarun authored Mar 14, 2021
2 parents 519ea83 + 7527125 commit 3c0c595
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion plugins/preview-tui
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion plugins/preview-tui-ext
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c0c595

Please sign in to comment.