Hi, i am fairly new to python programming but enjoying it so far.
Using a python script i am wanting to have a slideshow running with Feh image viewer. The slideshow is started with a Popen command, and the subprocess is killed after the slideshow is finished / last image in folder is reached. (and a next process is started).
the command to starting the slideshow, displaying all files in the folder images:To kill the process when the last image is reached, i was wondering if it was possible to get the filename of the current file and store it to a varia ble. Using feh's --action option, i was hoping to get it sorted, but no luck.
Using echo i can get the filename:however getting it to a variable is difficult, i have tried:however no luck.
So the Feh action command would be a bash command, i have also tried:This gives me a permission denied.
Any suggestions? Thanks in advance!
Using a python script i am wanting to have a slideshow running with Feh image viewer. The slideshow is started with a Popen command, and the subprocess is killed after the slideshow is finished / last image in folder is reached. (and a next process is started).
the command to starting the slideshow, displaying all files in the folder images:
Code:
p2 = Popen(['feh', 'images', '-F', '-Y'])
Using echo i can get the filename:
Code:
p2 = Popen(['feh', 'images', '-F', '-Y', -A, "echo %F"])
Code:
p2 = Popen(['feh', 'images', '-F', '-Y', -A, 'filename = %F'])p2 = Popen(['feh', 'images', '-F', '-Y', -A, '"filename = %F"'])p2 = Popen(['feh', 'images', '-F', '-Y', -A, 'filename = str(%F)'])
So the Feh action command would be a bash command, i have also tried:
Code:
p2 = Popen(['feh', 'images', '-F', '-Y', -A, 'filename = $(%F)'])
Any suggestions? Thanks in advance!
Statistics: Posted by rastamano — Sat Jun 08, 2024 10:07 pm — Replies 0 — Views 3