pqiv icon indicating copy to clipboard operation
pqiv copied to clipboard

how to use "goto_file_byname"

Open x-real-ip opened this issue 4 years ago • 1 comments
trafficstars

I've been trying to get the following done for days now, but can't get it working. image 1.gif and 2.gif are in the same directory.

step 1. i execute the folowing command and that works perfectly pqiv -i -t --fullscreen --display=:0 /home/instructions/1.gif

  1. now i want execute another command that shows another image, the problem is if i use the same command as above it will open a new window and 2 proceses are running. if I do this more often then too many processes/windows will open. I thought I had a solution using the "goto_file_byname" command but I can't get this to work and I don't really know how to build the command. Can someone help me? the follwing command doesnt work

pqiv -i -t --fullscreen --display=:0 goto_file_byname(2.gif) or pqiv -i -t --fullscreen --display=:0 goto_file_byname(/home/instructions/2.gif)

x-real-ip avatar Dec 23 '20 19:12 x-real-ip

Hi, sorry for taking a while to get back to you.

pqiv actions are not meant for RPC. If you invoke it a second time, it'll always start another instance of the application. You can use --actions-from-stdin and a script though to do what you want:

mkfifo pqiv-control
while true; do cat pqiv-control; done | pqiv --actions-from-stdin <directory goes here>

and then from somewhere else

echo 'relative_image_movement(1)' > pqiv-control

Note that goto_file_byname only works on images that pqiv already knows about. Use add_file to add it upfront.

phillipberndt avatar Jan 06 '21 13:01 phillipberndt