summaryrefslogtreecommitdiffstats
path: root/.scripts/tools/vu
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-03-09 12:17:15 -0500
committerLuke Smith <luke@lukesmith.xyz>2019-03-09 12:17:15 -0500
commitcca884b02e2cbf5634d6228f8fd5628d365e5bf9 (patch)
tree921caa25006c3f562e396dc4a257fc465e4d5525 /.scripts/tools/vu
parent84bf3956f042159d7b74508dbecd6ff9495794c5 (diff)
downloadeibhear-cca884b02e2cbf5634d6228f8fd5628d365e5bf9.tar.gz
eibhear-cca884b02e2cbf5634d6228f8fd5628d365e5bf9.tar.zst
eibhear-cca884b02e2cbf5634d6228f8fd5628d365e5bf9.zip
vifm default file manager w/ überzug
Diffstat (limited to '.scripts/tools/vu')
-rwxr-xr-x.scripts/tools/vu15
1 files changed, 15 insertions, 0 deletions
diff --git a/.scripts/tools/vu b/.scripts/tools/vu
new file mode 100755
index 0000000..778835a
--- /dev/null
+++ b/.scripts/tools/vu
@@ -0,0 +1,15 @@
+#!/usr/bin/env sh
+export FIFO_UEBERZUG="/tmp/vifm-ueberzug-${PPID}"
+
+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