summaryrefslogtreecommitdiff
path: root/.local/bin/vifmrun
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/vifmrun')
-rwxr-xr-x.local/bin/vifmrun16
1 files changed, 16 insertions, 0 deletions
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