Description
I'd like a way to output to an opener program/remote/etc/variable all the current files in the directory, in the current order they appear in lf.
Here's one of my use cases. As it is, I use the image viewer sxiv which can open multiple images at once as arguments or through stdin. So I want to have lf open an image, for that image to appear in sxiv, but also I'd like sxiv to receive the other images in the directory so I can move through them in sxiv, independently of lf.
Right now I have an external script that takes all the images in the current directory (with ls
or find
), orders them (via awk
) so that the currently selected one is on top, and then sends them to sxiv. This allows me to open an images in a directory, and then move through the other images in sxiv in the order they are arranged by default (i.e. alphabetically), without having to open them one by one in lf.
This works fine in the simple case as is, but suppose someone wants to sort photos by date or size or some other variable lf can sort images by. In this case, if they open the file up in sxiv, sxiv will still get the images from the rifling script in alphabetical order and thus to sort through the images that way would not work as according to plan. Images in lf would be sorted as desired by time, but images in the opener sxiv, would still be sorted alphabetically.
The most extensible fix for this I can think of is, as I said, have a way to output all files in the directory in the order they appear.
Another possibility is communicating with lf to get the current sort variable. Perhaps there's a way to do this now. I'm not sure.
If anyone has any clues as to how to solve this with lf as it is now, please tell me, but such an extension I think would enable new clever ways to open and deal with files.