vifm: Improve image preview with fallback

If a locally compiled version of viu exists it will use this for
full image preview display (full-color image). If it does not
exist it will instead fall back to the system viu and use
block-wise display for the preview. Location that local viu is
expected is `~/.local/bin/viu`.

The reason behind this is a bug (or at least unwanted
functionality) in viu which makes it not work correctly from
within vifm. You will have to fix this issue and compile a local
version of viu which vifm assumes to be in the local binary
directory and uses to display the pretty images.
This commit is contained in:
Marty Oehme 2023-07-23 19:28:15 +02:00
parent 9669b061a3
commit 5712a5bf64
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -444,7 +444,11 @@ filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
\ {View in gpicview}
\ gpicview %c,
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
\ viu -b -w %pw -h %ph -s %c
" 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
" OpenRaster
filextype *.ora