pqiv
pqiv copied to clipboard
output path of marked images in montage mode
Hello, I used to use sxiv on linux as a picker for my scripts. Basically all I need is to select some images and somehow exit outputing paths to these selected ones.
Is anything like this possible? I can mark but nothing is outputed after close. Is there a way to do that ?
something like
echo "output_marked_file_list(); quit()" | pqiv --actions-from-stdin folder
A step there might be if commands were also accepted from montage mode (which currently they are not). Then you could call pqiv --command-1=-"cat > your-list-file". You get some of the way already if you mark, then go from montage mode into the image, and press 1. (It's not "on exit", but the command might even kill the pqiv that launched it after writing to the file).
probably, i cant code C so i did the only logical thing and started writing minimal version of that in rust 😂
Actually I do think that this can be achievable without even knowing C. The numeric key bindings are just not bound in montage mode by default. I don't remember off my head how pqiv key bindings are configured, but chances are you can even bind q (or however you want to be done) in montage mode to numeric_command(1), and then if you set --command-1="-my_command && pkill pqiv", and you get the behavior you desire.
Right, it's as simple as that :)
./pqiv --bind-key "@MONTAGE { 1 { command(-cat); quit(); } }" your_folder/