hackerb9 / lsix

Like "ls", but for images. Shows thumbnails in terminal using sixel graphics.
GNU General Public License v3.0
3.97k stars 129 forks source link

Real text under thumbnails #70

Open taokann opened 2 months ago

taokann commented 2 months ago

It could be great to have real text under thumbnails instead of rasterized text. This would allow the user to copy-paste that 20240430_120511.png to eventually mv it into the cat_pictures/ directory.

NB. You can't just use tab-completion since they are many other pictures with different dates and time using the same format.

hackerb9 commented 2 months ago

Good idea. Not sure it fits with lsix, though as its goal is to be small and uncomplicated so people can extend it as they wish.

Maybe try vv, an incomplete, but mostly working image viewer. vv already shows the filename as text (and as a mouse clickable link), but it's even easier to move files: hit the m key, It remembers the last directory you moved files into, so it is easy to use it again.

Let me know if vv fits your needs and, if not, how you imagine it should work.

taokann commented 2 months ago

Thank you for your answer. I tried vv but it doesn't seem to address the issue.

So I really prefer lsix's behaviour. Moving files was only an example, it could be any action I want to take on images.

My typical workflow :

image

  1. ls
  2. [whatever command] [double click+middle click inserts filename]

(obviously here I could have used tab completion)

My goal is to achieve this on images. Let's imagine I want to edit a picture with boats at sunset.

Screenshot_20240504_011451

  1. ls
  2. Oops, I don't know which one it is!

image

  1. lsix. I see boats at sunset is 'Paysage-HD (28).jpg'
  2. gimp 'Paysage-HD (28).jpg' I must type it manually, can't copy paste with mouse.

I hope this example was more undersantable. This use-case of lsix is "What's the filename of this picture I am thinking of?". Then I want to use that filename to do something.

I think this would imply:

  1. Remove filenames in montage call
  2. Print a text line between each pictures line
hackerb9 commented 2 months ago

Thank you for taking the time to mock this up and show the use case. The explanation that you want to run any command and use double-click + middle-paste makes sense to me. I'll look into whether it is something that can be done in lsix while keeping the script simple.

However, it is tricky because of some of the assumptions lsix uses to be so short. It would be easier to add an lsix like grid view to vv (which I've let grow gargantuan) than to show plain text in lsix.

By the way, vv is supposed to show thumbnails by default. Even if you hit 'f' for "full screen" mode, it is never supposed to scroll the filename off from the image. It measures the number of terminal rows and subtracts two, one for the filename and one for the prompt. What terminal program are you using?