Skip to content

Instantly share code, notes, and snippets.

@photonxp
Last active January 28, 2018 09:02
Show Gist options
  • Save photonxp/ba921b94340834cfc43b66203f69039c to your computer and use it in GitHub Desktop.
Save photonxp/ba921b94340834cfc43b66203f69039c to your computer and use it in GitHub Desktop.
copy images from a directory to replace a given test image one by one
#!/bin/sh
# https://superuser.com/questions/211561/loop-pictures-from-a-folder-and-display-fullscreen-slideshow
# It's better to adjust gthumb to "Fit to window" in preferences.
# Image Viewer(eog) could do the same job as gthumb, if in full screen mode.
# use absolute path instead of relative path in case something went wrong
test_img_path="/path/to/test.jpeg"
img_folder_path="/path/to/testdir_with_images"
while true ; do for i in `find $img_folder_path -name "*.jpeg"` ; do cp "$i" $test_img_path ; echo $i ; sleep 5 ; done ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment