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.
This commit is contained in:
Marty Oehme 2023-10-03 13:00:29 +02:00
parent 7ccd7e4757
commit ba042db7df
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -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