Coder Social home page Coder Social logo

please add browsing images about timg HOT 5 OPEN

hzeller avatar hzeller commented on May 18, 2024
please add browsing images

from timg.

Comments (5)

hzeller avatar hzeller commented on May 18, 2024 1

interesting. Looke like less can't deal with the grid layout as the output to the terminal writing one image at a time, then jumping back up and to the right and then doing the next image. The -R option sanitizes the cursor jumps away.

The default behavior is useful for regular terminal output in which we want images to show as soon as they are loaded, but maybe it would make sense in the cases of output not being a terminal to render each row first then output.

Note, for anyone reading this: to make less work at all with timg, you'd need the -R option to output raw escape sequences. (it sanitizes to not include cursor jump commands, so grid will shown one after another):

timg --grid=3 *.jpg | less -R

The lowercase -r option also outputs cursor jump commands and would actually allow to show the grid output, but then scrolling up will break

timg --grid=3 *.jpg | less -r

from timg.

Sonico98 avatar Sonico98 commented on May 18, 2024 1

How about implementing hyperlink support, like how coreutils ls does? That way it would be possible to use the already existing grid functionality, and each file would be clickeable. The only requirement would be to use a terminal that supports hyperlinks

from timg.

hzeller avatar hzeller commented on May 18, 2024

The closest to browsing images is so far the recently added grid mode. With --grid=3 you can for instance arrange images more compactly on the screen. If you add --title you can see the associated filenames.

But it is not interactive. That sounds like something useful: selecting an image and showing an enlarged version in a separate area.

from timg.

tombh avatar tombh commented on May 18, 2024

timg --grid=3 *.jpg|less is almost there, but the scrolling breaks

from timg.

xeruf avatar xeruf commented on May 18, 2024

In kitty, less -R only displays text while less -r displays the images but allows no scrollback :/

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.