diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2022-06-16 15:19:16 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2022-06-16 15:19:16 -0500 |
commit | 66bff0b5ef46550866c959bb745a61363dc5331f (patch) | |
tree | accb0a1923bf9673d54bca84ee637ed536ae7b6a /zsh/zscripts/lfub.zsh | |
parent | c878742ad78a014fef93c520abd1c1d846f2c0d9 (diff) | |
download | dotconfig-66bff0b5ef46550866c959bb745a61363dc5331f.tar.xz dotconfig-66bff0b5ef46550866c959bb745a61363dc5331f.zip |
zplug commit
Diffstat (limited to 'zsh/zscripts/lfub.zsh')
-rwxr-xr-x | zsh/zscripts/lfub.zsh | 27 |
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" |