summaryrefslogtreecommitdiff
path: root/zsh/zscripts/.lfub.zsh
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2024-10-17 22:46:39 -0500
committerTim Keller <tjk@tjkeller.xyz>2024-10-17 22:46:39 -0500
commit78d5e2082554d370f43216406f84872eaa2a4e5b (patch)
treefc354e842111062c057484cbb319e02037404975 /zsh/zscripts/.lfub.zsh
parent75793a911de3648963385c70237fc737f1967e9d (diff)
downloaddotconfig-78d5e2082554d370f43216406f84872eaa2a4e5b.tar.xz
dotconfig-78d5e2082554d370f43216406f84872eaa2a4e5b.zip
remove zsh and nvim configs from this repo and move to another
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"