vifm: Remove chafa preview iterm hard-coding

We are using chafa to preview the image and video files but would always
default to the iterm implementation. This has been removed: The foot
terminal does not support iTerm and hard-coding makes us too tightly
coupled to wezterm. But even wezterm functions well with chafa without
the forced iterm usage - we simply use sixels instead.

Remove video preview frame hard-coded file caching and instead pipe
directly into chafa preview.
This commit is contained in:
Marty Oehme 2025-05-09 08:54:22 +02:00
parent 9db181c35e
commit 67ac2da785
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -442,7 +442,7 @@ fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
\*.as[fx] \*.as[fx]
" needs to be %pu uncached or it flickers itself into oblivion :( " needs to be %pu uncached or it flickers itself into oblivion :(
\ exist chafa && ffmpeg -y -hide_banner -loglevel panic -i %c -ss 00:00:01.000 -vframes 1 /tmp/tempfile.jpg && chafa -f iterm --size %pwx%ph /tmp/tempfile.jpg %pd %pu %N || echo chafa not found, \ exist chafa && ffmpeg -v quiet -y -hide_banner -loglevel panic -ss 00:00:01.000 -i %c -frames:v 1 -c:v png -f image2pipe - | chafa --size %pwx%ph %pd %pu %N || echo chafa not found,
\ ffprobe -pretty %c 2>&1 \ ffprobe -pretty %c 2>&1
" Web " Web
@ -484,7 +484,7 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
\ gpicview %c, \ gpicview %c,
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
" needs to be %pu uncached or it flickers itself into oblivion :( " needs to be %pu uncached or it flickers itself into oblivion :(
\ exist chafa && chafa -f iterm --size %pwx%ph %c:p %pd %pu %N || echo chafa not found \ exist chafa && chafa --size %pwx%ph %c:p %pd %pu %N || echo chafa not found
set previewoptions+=graphicsdelay:0 set previewoptions+=graphicsdelay:0
" OpenRaster " OpenRaster