Initial commit

This commit is contained in:
agryphus 2023-08-02 00:45:22 -04:00
commit 85f5be4658
18 changed files with 663 additions and 0 deletions

20
.local/bin/lfub Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
set -e
cleanup() {
exec 3>&-
rm "$FIFO_UEBERZUG"
}
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
lf "$@"
else
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$"
mkfifo "$FIFO_UEBERZUG"
ueberzug layer -s --output x11 <"$FIFO_UEBERZUG" -p json &
exec 3>"$FIFO_UEBERZUG"
trap cleanup HUP INT QUIT TERM PWR EXIT
lf "$@" 3>&-
fi