Created
September 6, 2013 12:18
-
-
Save worenga/6463030 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Wait for program | |
wait_for () { | |
echo wait | |
n=0 | |
while true | |
do | |
if $1; then | |
break | |
else | |
# 10 seconds timeout | |
if [ $n -eq 100 ]; then | |
xmessage "Error on: $1" | |
break | |
else | |
n=`expr $n + 1` | |
sleep .1 | |
fi | |
fi | |
done | |
sleep 1 | |
} | |
lxterminal & | |
wait_for "xdotool search --onlyvisible --pid $! --name lxterminal" | |
i3-msg split h | |
lxterminal & | |
wait_for "xdotool search --onlyvisible --pid $! --name lxterminal" | |
i3-msg split v | |
lxterminal & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment