From e371d9edd474bcf89cf5d462eaccb8638900b390 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 3 Oct 2020 19:27:15 -0400 Subject: Initial commit --- .local/bin/vifmrun | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 .local/bin/vifmrun (limited to '.local/bin/vifmrun') diff --git a/.local/bin/vifmrun b/.local/bin/vifmrun new file mode 100755 index 0000000..69f2d22 --- /dev/null +++ b/.local/bin/vifmrun @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +export FIFO_UEBERZUG="/tmp/vifm-ueberzug-${PPID}" + +function cleanup() { + rm "$FIFO_UEBERZUG" 2>/dev/null + pkill -P $$ 2>/dev/null +} + +rm "$FIFO_UEBERZUG" 2>/dev/null +mkfifo "$FIFO_UEBERZUG" +trap cleanup EXIT +tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser bash & + +vifm "$@" +cleanup -- cgit v1.2.3