From b712444b4c149c74afdc8ab02f76c128a8e481b3 Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Thu, 19 Apr 2012 17:17:53 +0200 Subject: [PATCH] Pridana knihovna getxsock --- c/vizionix/getxsock.sh | 6 ++++++ c/vizionix/mplaywrap.sh | 3 +-- c/vizionix/xtermwrap.sh | 6 ++---- 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100755 c/vizionix/getxsock.sh diff --git a/c/vizionix/getxsock.sh b/c/vizionix/getxsock.sh new file mode 100755 index 0000000..e2615ed --- /dev/null +++ b/c/vizionix/getxsock.sh @@ -0,0 +1,6 @@ +#!/bin/bash +kill -0 $XSOCK_PID || { + PATH="./:$PATH" + eval "$(mkxsock)" +} +export XSOCK_PID XSOCK_WID diff --git a/c/vizionix/mplaywrap.sh b/c/vizionix/mplaywrap.sh index 02cd3e6..4af702e 100755 --- a/c/vizionix/mplaywrap.sh +++ b/c/vizionix/mplaywrap.sh @@ -1,4 +1,3 @@ #!/bin/bash -PATH="./:$PATH" -eval "$(mkxsock)" +. getxsock.sh mplayer -fs -wid "$XSOCK_WID" $@ diff --git a/c/vizionix/xtermwrap.sh b/c/vizionix/xtermwrap.sh index 7028a51..56c5f8c 100755 --- a/c/vizionix/xtermwrap.sh +++ b/c/vizionix/xtermwrap.sh @@ -1,5 +1,3 @@ #!/bin/bash -PATH="./:$PATH" -eval "$(mkxsock)" -xterm -xrm "XTerm.vt100.allowSendEvents:true" -into "$XSOCK_WID" $@ - +. getxsock.sh +xterm -xrm "XTerm.vt100.allowSendEvents:true" -into "$XSOCK_WID" -bg black -fg white $@ -- 2.30.2