Remove lfub
This commit is contained in:
parent
cf56b8dde8
commit
ae87742711
1 changed files with 0 additions and 32 deletions
|
|
@ -1,32 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
# Ueberzugpp script for lf file explorer
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
UB_PID=0
|
|
||||||
UB_SOCKET=""
|
|
||||||
|
|
||||||
case "$(uname -a)" in
|
|
||||||
*Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;;
|
|
||||||
*) UEBERZUG_TMP_DIR="/tmp" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
cleanup() {
|
|
||||||
exec 3>&-
|
|
||||||
ueberzug cmd -s "$UB_SOCKET" -a exit
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
|
||||||
command lf "$@"
|
|
||||||
else
|
|
||||||
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
|
|
||||||
UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
|
|
||||||
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
|
|
||||||
command lf "$@" 3>&-
|
|
||||||
fi
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue