From 3f600ab07dbad3b6dd7655587ddea158b19aea71 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 26 Aug 2023 23:42:21 +0200 Subject: Refactor(treewide): Abbreviate path names --- hm/soispha/pkgs/scripts/wrappers/llp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 hm/soispha/pkgs/scripts/wrappers/llp (limited to 'hm/soispha/pkgs/scripts/wrappers/llp') diff --git a/hm/soispha/pkgs/scripts/wrappers/llp b/hm/soispha/pkgs/scripts/wrappers/llp new file mode 100755 index 00000000..2a21450c --- /dev/null +++ b/hm/soispha/pkgs/scripts/wrappers/llp @@ -0,0 +1,19 @@ +#! /bin/bash + +export LLP=1 +cleanup() { + exec 3>&- + rm "$FIFO_UEBERZUG" +} + +if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then + lf "$@" +else + [ ! -d "$HOME/.cache/lf" ] && mkdir --parents "$HOME/.cache/lf" + export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" + mkfifo "$FIFO_UEBERZUG" + ueberzug layer -s <"$FIFO_UEBERZUG" -p json & + exec 3>"$FIFO_UEBERZUG" + trap cleanup EXIT + lf "$@" 3>&- +fi -- cgit 1.4.1