From ba042db7df995d141abcf6bd95bc37b41533b65a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 3 Oct 2023 13:00:29 +0200 Subject: [PATCH] vifm: Fix wezterm image preview with chafa We now use chafa to preview images. We use its iterm mode since that seems to be the best integrated into wezterm currently. We have to use uncached previews so it is a little slower, but at least it functions perfectly after the first image is displayed. --- terminal/.config/vifm/vifmrc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/terminal/.config/vifm/vifmrc b/terminal/.config/vifm/vifmrc index cf813a8..a55a795 100644 --- a/terminal/.config/vifm/vifmrc +++ b/terminal/.config/vifm/vifmrc @@ -427,12 +427,12 @@ fileviewer *.[1-8] man ./%c | col -b " Images filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm + \ {View in imv} + \ imv %f %i, \ {View in viu} \ viu --once --name %f; read -k 1 -s -r, \ {View in nsxiv directory viewer} \ vifm-thumbnailer %c, - \ {View in imv} - \ imv %f, \ {View in nsxiv} \ nsxiv %f, \ {View in vimiv} @@ -444,11 +444,9 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm \ {View in gpicview} \ gpicview %c, fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm - " to circumvent the bug: https://github.com/atanunq/viuer/issues/44 - " thus, change the viuer library and build it with the new lib locally - " put it into the local bin directory and you can see full pics. - " Otherwise falls back to block-sized display - \ exist ~/.local/bin/viu && env -u COLORTERM ~/.local/bin/viu -w %pw -s %c %pd || env -u COLORTERM viu -b -w %pw -s %c %pd + " 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 +set previewoptions+=graphicsdelay:0 " OpenRaster filextype *.ora