diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2019-11-26 16:05:29 -0500 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2019-11-26 16:05:29 -0500 |
| commit | 1b290cfa7a46d7f588612455d70c460e6270a297 (patch) | |
| tree | 31cfc3d909b545b6340c71143c3ce1172d934e03 /.local/bin/vu | |
| parent | 1f4fa9e0e993bf5bf1bba3ae2753b3d834e1f67e (diff) | |
| download | eibhear-1b290cfa7a46d7f588612455d70c460e6270a297.tar.gz eibhear-1b290cfa7a46d7f588612455d70c460e6270a297.tar.zst eibhear-1b290cfa7a46d7f588612455d70c460e6270a297.zip | |
vifm materials readded
Diffstat (limited to '.local/bin/vu')
| -rwxr-xr-x | .local/bin/vu | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.local/bin/vu b/.local/bin/vu new file mode 100755 index 0000000..1e8d59e --- /dev/null +++ b/.local/bin/vu @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +# This is a wrapper for vifm to allow ueberzug images. + +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 |
