summaryrefslogtreecommitdiff
path: root/zsh/zscripts/.lfub.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/zscripts/.lfub.zsh')
-rwxr-xr-xzsh/zscripts/.lfub.zsh27
1 files changed, 0 insertions, 27 deletions
diff --git a/zsh/zscripts/.lfub.zsh b/zsh/zscripts/.lfub.zsh
deleted file mode 100755
index 2e1f7f4..0000000
--- a/zsh/zscripts/.lfub.zsh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# This is a wrapper script for lf that allows it to create image previews with
-# ueberzug. This works in concert with the lf configuration file and the
-# lf-cleaner script.
-
-cleanuplf() {
- exec 3>&-
- \rm "$FIFO_UEBERZUG"
-}
-
-lfub() {
- dircache=/tmp/$USER-lflastdir
- lfopt="--last-dir-path=$dircache"
- if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
- lf "$lfopt" "$@"
- else
- export FIFO_UEBERZUG="/tmp/ueberzug-$$"
- mkfifo "$FIFO_UEBERZUG"
- ueberzug layer -s <"$FIFO_UEBERZUG" -p json &
- exec 3>"$FIFO_UEBERZUG"
- trap cleanuplf HUP INT QUIT TERM PWR EXIT
- lf "$lfopt" "$@" 3>&-
- fi
- [ -f "$dircache" ] && dir="$(cat "$dircache")" && [ -d "$dir" ] && cd "$dir"
-}
-
-alias lf="lfub"