summaryrefslogtreecommitdiff
path: root/addons/x11infoscreen/usr/local/bin/slideshow
diff options
context:
space:
mode:
Diffstat (limited to 'addons/x11infoscreen/usr/local/bin/slideshow')
-rwxr-xr-xaddons/x11infoscreen/usr/local/bin/slideshow33
1 files changed, 33 insertions, 0 deletions
diff --git a/addons/x11infoscreen/usr/local/bin/slideshow b/addons/x11infoscreen/usr/local/bin/slideshow
new file mode 100755
index 0000000..f0c3915
--- /dev/null
+++ b/addons/x11infoscreen/usr/local/bin/slideshow
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "$DISPLAY" ]; then
+ export DISPLAY=:0
+fi
+
+# Make sure display is alive and awake
+/usr/local/bin/xset s reset
+/usr/local/bin/xset s off
+
+# Clean out stale directories (hoping noone else use same name!)
+rm -rf /tmp/xslideshow.??????
+
+workdir="`mktemp -d /tmp/xslideshow.XXXXXX`"
+remotehost="lager"
+remoteuser="infoscreen"
+remotedir="/home/jonas/websites/info.dgi-huset.dk/img"
+
+#cd "$workdir"
+
+while true; do
+ rsync -a "$remoteuser@$remotehost":"$remotedir"/*.png "$workdir/"
+ files="`find $workdir -name '*.png' | sort`"
+ for file in $files; do
+# timeslices=`echo $file | sed 's/.*_([0-9]+)s\.png/\1/'`
+# for i in `seq 1 $timeslices`; do
+ qiv -m --root $file
+ sleep 5
+ done
+done
+# qiv -m --slide --delay=5 $files