pqiv icon indicating copy to clipboard operation
pqiv copied to clipboard

Question: opening new files from pqiv

Open infokiller opened this issue 6 years ago • 2 comments
trafficstars

Hi and thanks for the great project, I really like it!

I know that there is the add_file command, but I couldn't figure out if there's a way to prompt for a filename to feed that command. My goal is to be able to press a keybinding from pqiv which will open a fuzzy file selector (based on fzf or rofi), and then add that file to the list of files.

I can use something like command(|fzf | xargs cat), but that feels a bit awkward since pqiv won't be aware that this is actually a file and not just output generated by a command.

Thanks!

infokiller avatar Dec 04 '18 15:12 infokiller

I am very close to being convinced that embedding a lua interpreter into pqiv is a good idea ;-)

For now, this is indeed not possible any easier, except if you're willing to wrap pqiv in a script for communication (see --actions-from-stdin). I guess what's missing is a command mode where the command's output is interpreted as a (list of) pqiv action(s). It shouldn't be hard to add that, I'll try to see what I can do.

phillipberndt avatar Dec 04 '18 21:12 phillipberndt

Thanks a lot Phillip! Just wanted to note that this is a fairly minor issue for me. pqiv in by far the best image viewer I've used.

infokiller avatar Dec 05 '18 04:12 infokiller