-
Notifications
You must be signed in to change notification settings - Fork 256
Order of marked images when passed to key handler #362
Comments
Thanks for replying. I normally run sxiv from a bash/zsh shell with something like Anyway, so am I right in thinking that currently, there is no way of knowing the order in which the images were marked? |
I was suggesting to replace I was just curious because your comment implied that xsiv is ordering the marked images alphabetically but I thought it might just output them in input order. You are right that this won't solve your use case but it would turn this from a 'please change the way you sort the output' (from alphabetically to by selection order) into a 'please support sorting the output' (by selection order) request. Thus, this simple check (which I could have done myself but was to lazy to) could help to better assess the extend of changes / amount of work your feature request would require. |
@taimoorc Thanks, I'll take a look |
Let me know if there are any bugs. If you can comment on the pull request I'd appreciate that too. |
The order of the selection is not visible and as such I do not want it to have any significance. Instead I'd rather add commands to reorder the image list. |
@muennich : I implemented reordering commands in my fork. The commit factoring is not very good, but the basic operation (main.c: shift_marked_files) is easy to understand on a technical level IMO (memcpy + temp buffers). I implemented multiple operations and keybound them all: reorder_marked_images_to_current (placing the marked images before or after the current images) reorder_marked_images (placing the marked images at the end or start of the filelist), The usage pattern that emerged suggests that moving marked images as a block to the beginning or end of the filelist is easiest to understand, and 'stacking up' more files after your first pass is simple : keep the existing marks, and mark the images you want to add, then perform the reordering operation again. I don't personally find reorder_image (the 'move a single image N slots' version) useful, but someone else might. I consider the other two concepts (reorder to alternate, reorder to current) failures as they are too difficult to predict the result of. 'Remove marked images' might also be a complimentary concept -- personally, I implemented that too and then never used it. If you have any actual plans to implement reordering commands, I hope this helps inform them. |
Hi, I am currently writing a little script to generate gifs out of images marked by sxiv. I am doing this using the key handler. ctrl+x ctrl+g will launch my script with the marked images passed to stdin.
I would like the images to be passed in the order that I marked them but it seems that they are always sent alphabetically. Is it possible to have them sent to the script in the order that they were selected?
The text was updated successfully, but these errors were encountered: