summaryrefslogtreecommitdiff
path: root/zsh/zscripts/lfub.zsh
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2022-06-16 15:19:16 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2022-06-16 15:19:16 -0500
commit66bff0b5ef46550866c959bb745a61363dc5331f (patch)
treeaccb0a1923bf9673d54bca84ee637ed536ae7b6a /zsh/zscripts/lfub.zsh
parentc878742ad78a014fef93c520abd1c1d846f2c0d9 (diff)
downloaddotconfig-66bff0b5ef46550866c959bb745a61363dc5331f.tar.xz
dotconfig-66bff0b5ef46550866c959bb745a61363dc5331f.zip
zplug commit
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 83b00c1..0000000
--- a/zsh/zscripts/lfub.zsh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# This is a wrapper script for lb 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"