Editing vifm configs to use ueberzug for video previews as well as image previews.

This commit is contained in:
Derek Taylor
2019-03-02 07:30:14 -06:00
parent 373135ef7a
commit ae89cde7d2
2 changed files with 11 additions and 6 deletions

View File

@@ -7,7 +7,13 @@ if [ -e "$FIFO_UEBERZUG" ]; then
[x]="$2" [y]="$3" [width]="$4" [height]="$5" \
[path]="${PWD}/$6") \
> "$FIFO_UEBERZUG"
else
elif [[ "$1" == "videopreview" ]]; then
[[ ! -f "/tmp/$6.png" ]] && ffmpegthumbnailer -i "${PWD}/$6" -o "/tmp/$6.png" -s 0 -q 10
declare -p -A cmd=([action]=add [identifier]="$ID_PREVIEW"
[x]="$2" [y]="$3" [width]="$4" [height]="$5" \
[path]="/tmp/$6.png") \
> "$FIFO_UEBERZUG"
elif [[ "$1" == "clear" ]]; then
declare -p -A cmd=([action]=remove [identifier]="$ID_PREVIEW") \
> "$FIFO_UEBERZUG"
fi