From a GUI terminal emulator running
bash, I would like to open a
tabbed instance, get its X window ID, and use it to embed four
st terminal instances inside
tabbed, with titles from
4, in ascending or descending order. I tried the following script:
#!/usr/bin/bash xid=`tabbed -cd` i=1 while [ $i -le $1 ]; do st -t $i -w $xid & i=$(($i+1)) done
It works, but the
sts are launched not in the sequence imposed by the
while cycle: the order of tabs, in fact, is random.
1) They must all be background processes, but how to obtain the correct order for them?
2) How to obtain the same with CLI?
$ xid=`tabbed -cd` && (st -t '1' -w $xid & st -t '2' -w $xid & st -t '3' -w $xid & st -t '4' -w $xid &)
creates an apparent random order like the script.