Removed absolute lf path
This commit is contained in:
parent
24e98fd47e
commit
c66efc268c
2 changed files with 6 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
# Ueberzugpp script for lf file explorer
|
||||
|
||||
set -e
|
||||
|
|
@ -13,20 +13,20 @@ esac
|
|||
|
||||
cleanup() {
|
||||
exec 3>&-
|
||||
ueberzugpp cmd -s "$UB_SOCKET" -a exit
|
||||
ueberzug cmd -s "$UB_SOCKET" -a exit
|
||||
}
|
||||
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
/usr/bin/lf "$@"
|
||||
command lf "$@"
|
||||
else
|
||||
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
|
||||
UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
|
||||
ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "$UB_PID_FILE"
|
||||
ueberzug layer --silent --no-stdin --use-escape-codes --pid-file "$UB_PID_FILE"
|
||||
UB_PID=$(cat "$UB_PID_FILE")
|
||||
rm "$UB_PID_FILE"
|
||||
UB_SOCKET="$UEBERZUG_TMP_DIR/ueberzugpp-${UB_PID}.socket"
|
||||
export UB_PID UB_SOCKET
|
||||
trap cleanup HUP INT QUIT TERM EXIT
|
||||
/usr/bin/lf "$@" 3>&-
|
||||
command lf "$@" 3>&-
|
||||
fi
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue