GithubHelp home page GithubHelp logo

image preview on vifm about timg HOT 5 CLOSED

hzeller avatar hzeller commented on May 19, 2024
image preview on vifm

from timg.

Comments (5)

hzeller avatar hzeller commented on May 19, 2024

This is typically because terminal programs keep tight control over what is being output to the terminal, so that it doesn't destory its UI. Maybe there is a configuration option for vifm to configure it to let color control codes through ?

from timg.

hzeller avatar hzeller commented on May 19, 2024

I tried a current version of vifm and it seems to work. I've just added it to the filextype like follows

filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
         \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
         \*.as[fx]
        \ {View in timg}
        \ timg --title --center --clear %f,

filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
        \ {View in timg}
        \ timg --title --center --clear %f; read -n1 -s -r -p "Press any key to return",

from timg.

hzeller avatar hzeller commented on May 19, 2024

Documentation about how to use in vifm now in the toplevel README.

from timg.

JakeJing avatar JakeJing commented on May 19, 2024

The proposed solution doesn't work. No image is shown in vifm. I tried it on kitty, iterm2 and WezTerm. My current setting in vifmrc looks like this:

fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
        \ timg -g %pwx%ph %f

It gives a blurry image preview. Adding -pk flag fails to view the image. Can you pls update the solution? Thanks!

from timg.

hzeller avatar hzeller commented on May 19, 2024

this is probably because vifm filters the extra escape codes used for the high resolution images. This is not something timg can work around, you need to ask the vifm project and ask how you can get that going.

from timg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.