From 53f42a52329db9d0b5645442f2ebc378aa9e2d5e Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Tue, 30 Jan 2024 16:25:27 -0500 Subject: Ueberzug no longer leaks --- .local/bin/lfub | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.local/bin/lfub') diff --git a/.local/bin/lfub b/.local/bin/lfub index 9012f50..43a7ef9 100755 --- a/.local/bin/lfub +++ b/.local/bin/lfub @@ -7,7 +7,7 @@ set -e cleanup() { - exec 3>&- + exec 3>&- rm "$FIFO_UEBERZUG" } @@ -17,8 +17,9 @@ else [ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf" export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" mkfifo "$FIFO_UEBERZUG" - ueberzug layer -s <"$FIFO_UEBERZUG" -p json & + ueberzug layer -s -p json <"$FIFO_UEBERZUG" & exec 3>"$FIFO_UEBERZUG" trap cleanup HUP INT QUIT TERM PWR EXIT lf "$@" 3>&- + killall ueberzug >/dev/null 2>&1 fi -- cgit v1.2.3