Marcelo Cerri <mhcerri@xxxxxxxxx> writes:
Using "--pid" instead of "--classname" for xdotool may solve the
problem for terminals:
#! /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
}
urxvt &
wait_for "xdotool search --onlyvisible --pid $!"
i3-msg split h
urxvt &
wait_for "xdotool search --onlyvisible --pid $!"
i3-msg split v
urxvt &