From 67ac2da785d16673b6b1cf7692044732e3d605dd Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 9 May 2025 08:54:22 +0200 Subject: [PATCH] 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. --- terminal/.config/vifm/vifmrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminal/.config/vifm/vifmrc b/terminal/.config/vifm/vifmrc index a667bdb..dad0dc3 100644 --- a/terminal/.config/vifm/vifmrc +++ b/terminal/.config/vifm/vifmrc @@ -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, \*.as[fx] " 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 " Web @@ -484,7 +484,7 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm \ gpicview %c, fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm " 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 " OpenRaster