summaryrefslogtreecommitdiff
path: root/addons/x11infoscreen/usr/local/bin/slideshow
blob: f0c3915fdad14a78260ab564d8f082d646b335dd (plain)
  1. #!/bin/sh
  2. set -e
  3. if [ -z "$DISPLAY" ]; then
  4. export DISPLAY=:0
  5. fi
  6. # Make sure display is alive and awake
  7. /usr/local/bin/xset s reset
  8. /usr/local/bin/xset s off
  9. # Clean out stale directories (hoping noone else use same name!)
  10. rm -rf /tmp/xslideshow.??????
  11. workdir="`mktemp -d /tmp/xslideshow.XXXXXX`"
  12. remotehost="lager"
  13. remoteuser="infoscreen"
  14. remotedir="/home/jonas/websites/info.dgi-huset.dk/img"
  15. #cd "$workdir"
  16. while true; do
  17. rsync -a "$remoteuser@$remotehost":"$remotedir"/*.png "$workdir/"
  18. files="`find $workdir -name '*.png' | sort`"
  19. for file in $files; do
  20. # timeslices=`echo $file | sed 's/.*_([0-9]+)s\.png/\1/'`
  21. # for i in `seq 1 $timeslices`; do
  22. qiv -m --root $file
  23. sleep 5
  24. done
  25. done
  26. # qiv -m --slide --delay=5 $files