From: Tomas Mudrunka Date: Thu, 19 Apr 2012 15:17:53 +0000 (+0200) Subject: Pridana knihovna getxsock X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=b712444b4c149c74afdc8ab02f76c128a8e481b3;hp=--cc;p=mirrors%2FPrograms.git Pridana knihovna getxsock --- b712444b4c149c74afdc8ab02f76c128a8e481b3 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 $@