From 5712a5bf648735a07eaf2c392045ebb8d9c578c4 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 23 Jul 2023 19:28:15 +0200 Subject: [PATCH] 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. --- terminal/.config/vifm/vifmrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/terminal/.config/vifm/vifmrc b/terminal/.config/vifm/vifmrc index 6900451..020f129 100644 --- a/terminal/.config/vifm/vifmrc +++ b/terminal/.config/vifm/vifmrc @@ -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