summaryrefslogtreecommitdiff
path: root/.local/bin/lfub
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-01-30 16:25:27 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-01-30 16:25:27 -0500
commit53f42a52329db9d0b5645442f2ebc378aa9e2d5e (patch)
tree54a94744ce755eaa1e30f1fb89979edb75783903 /.local/bin/lfub
parentb238997b6d9761af695c46fbe02ea73e901ce785 (diff)
Ueberzug no longer leaks
Diffstat (limited to '.local/bin/lfub')
-rwxr-xr-x.local/bin/lfub5
1 files changed, 3 insertions, 2 deletions
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