lf cleanup

This commit is contained in:
Luke Smith
2022-03-11 18:32:19 -05:00
parent 21bbe35ae3
commit 42987c2d64
5 changed files with 26 additions and 17 deletions

View File

@@ -1,4 +0,0 @@
#!/bin/sh
if [ -n "$FIFO_UEBERZUG" ]; then
printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
fi

View File

@@ -1,9 +0,0 @@
#!/bin/sh
# Reads file names from stdin and selects them in lf.
while read -r file; do
[ -z "$file" ] && continue
lf -remote "send select \"$file\""
lf -remote "send toggle"
done

View File

@@ -19,6 +19,6 @@ else
mkfifo "$FIFO_UEBERZUG"
ueberzug layer -s <"$FIFO_UEBERZUG" -p json &
exec 3>"$FIFO_UEBERZUG"
trap cleanup EXIT
trap cleanup HUP INT QUIT TERM PWR EXIT
lf "$@" 3>&-
fi