1
0
Fork 0
mirror of https://gitlab.com/dwt1/dotfiles.git synced 2023-02-13 20:55:19 -05:00
dwt1--dotfiles/.config/vifm/scripts/vifmrun
Derek Taylor 53625322b5 new file: vifmimg, uberzug script for vifm image previews.
new file:   vifmrun, bash script to launch vifm with uberzug
image previews.
2019-02-28 21:54:33 -06:00

15 lines
318 B
Bash
Executable file

#!/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