From fee6ec9ef953f4ae050a01e0221732aa93fc4ee9 Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Thu, 19 Apr 2012 18:19:11 +0200 Subject: [PATCH] First experimental version of vizionix VJ software --- c/vizionix/getxsock.sh | 7 +++++-- c/vizionix/queue.txt | 4 ++++ c/vizionix/vizionix-cli.sh | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 c/vizionix/queue.txt create mode 100755 c/vizionix/vizionix-cli.sh diff --git a/c/vizionix/getxsock.sh b/c/vizionix/getxsock.sh index e2615ed..5cafc6b 100755 --- a/c/vizionix/getxsock.sh +++ b/c/vizionix/getxsock.sh @@ -1,6 +1,9 @@ #!/bin/bash -kill -0 $XSOCK_PID || { +TMPFILE="/tmp/xsock-$USER"; +[ -f "$TMPFILE" ] && . "$TMPFILE" +[ -n "$XSOCK_PID" ] && kill -0 "$XSOCK_PID" 2>/dev/null || { PATH="./:$PATH" - eval "$(mkxsock)" + eval "$(mkxsock | tee $TMPFILE)" + echo "XSOCK_PID set to $XSOCK_PID" >&2 } export XSOCK_PID XSOCK_WID diff --git a/c/vizionix/queue.txt b/c/vizionix/queue.txt new file mode 100644 index 0000000..5699cae --- /dev/null +++ b/c/vizionix/queue.txt @@ -0,0 +1,4 @@ +#mplaywrap.sh -endpos 2 ~/Downloads/outputvideo.mpeg +mplaywrap.sh -endpos 2 mplayer ~/Downloads/PROJEKCE/skeleton_walk_loop.mp4 +xtermwrap.sh -e 'timeout 1 ../spiral' + diff --git a/c/vizionix/vizionix-cli.sh b/c/vizionix/vizionix-cli.sh new file mode 100755 index 0000000..eb0655a --- /dev/null +++ b/c/vizionix/vizionix-cli.sh @@ -0,0 +1,7 @@ +#!/bin/bash +while true; do + echo "$(cat $1)" | while read cmd; do + . getxsock.sh; export XSOCK_PID XSOCK_WID + echo "$cmd" | bash + done; +done -- 2.30.2