0

I like to create preview image at lf, go-Lang file manager.
It is possible to create preview image at my manajro-Linux, using lfimg.

But it is not at my Mac, OSX-Mojave.
It is because "überzug", which create preview image, dose not work on OSX.
Then I am trying to use "imgcat" and iterm2, build3.4.1, instaed of "überzug".
Because I can create preview, using vifm and imgcat.

Git clone lfimg page and copy preview to ~/.config/lf/, and add following lines to lfrc, which is lf's config file.

$ vi lfrc

set previewer ~/.config/lf/preview

and modify preview.

$ vi preview

# Clear the last preview (if any)
#$HOME/.config/lf/image clear

# Calculate where the image should be placed on the screen.
num=$(printf "%0.f\n" "`echo "$(tput cols) / 2" | bc`")
numb=$(printf "%0.f\n" "`echo "$(tput cols) - $num - 1" | bc`")
numc=$(printf "%0.f\n" "`echo "$(tput lines) - 2" | bc`")

case "$1" in
   *.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.tif|*.gif)
   /usr/local/var/nodebrew/current/bin/imgcat  -w $numb -h $numc "$1"
   ;;

But preview image does not appear in preview window.
And, ASCII characters appears instead of image, which seems to mean image.

]1337;File=inline=1;width=43;height=49:R0lGODlhbQRSA/cAAA

Dose anyone has any good idea to fix this issue?

Thanks,
Yoda

yoda.55
  • 1
  • 1

0 Answers0