video_pi_play_images_only 503 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. [[ -z $1 ]] && exit 1
  3. find_sorted_excl_nonsense() {
  4. find "$1/" -type f | sort |
  5. grep -vi .DS_Store |
  6. grep -vi .AppleDouble |
  7. grep -vi .LSOverride |
  8. grep -vi desktop.ini |
  9. grep -vi Thumbs.db |
  10. grep -vi ehthumbs.db |
  11. grep -vi Desktop.ini |
  12. grep -vi "\$RECYCLE.BIN" |
  13. grep -v -E '/\.'
  14. }
  15. files=$(find_sorted_excl_nonsense "$1")
  16. if [[ -z "$files" ]]; then
  17. exit 0
  18. fi
  19. echo "$files" | grep -iE '\.(jpe?g|png)$' | tr '\n' '\0' | xargs -0 omxiv -t 5 -b