artemsen / swayimg

Image viewer for Wayland
MIT License
360 stars 28 forks source link

How to read in images from file? #186

Open wreckedred opened 2 weeks ago

wreckedred commented 2 weeks ago

Thank you your software.

I have a list of absolute paths to images in a file - how would I read them in to swayimg?

Something like...

swayimg --from-file=myimages.txt

artemsen commented 2 weeks ago

I will add this feature, but for now you can use the following workaround:

xargs -a filelist.txt swayimg -c list.all=no
wreckedred commented 2 weeks ago

Thank you - would be a nice addition.

diniamo commented 3 days ago

I don't believe this should be added, this is exactly why we have shell scripting. In fish you can even do this without xargs:

swayimg (cat list.txt)
artemsen commented 3 days ago

This will not work if you have spaces in the file name.

On Tue, Oct 8, 2024, 00:08 diniamo @.***> wrote:

I don't believe this should be added, this is exactly why we have shell scripting. In fish you can even do this without xargs:

swayimg (cat list.txt)

— Reply to this email directly, view it on GitHub https://github.com/artemsen/swayimg/issues/186#issuecomment-2397199855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI5UOCT7DTRSN6QYT3UFF3Z2KPWZAVCNFSM6AAAAABOSXVW7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJXGE4TSOBVGU . You are receiving this because you were assigned.Message ID: @.***>

diniamo commented 3 days ago

It will, since fish does expansion properly. I did test it before sending that as well.