unforseen result of sequential execution
asked 2012-09-17 12:31:20 +0000
This post is a wiki. Anyone with karma >100 is welcome to improve it.
Hi all,
i use
i3 version 4.2 (2012-04-25, branch "release-4.2")
and i am very happy with it. Many thanks to the developers for this great software and that they make it freely available. Now to my question.
To define a workspace on startup i followed fhaun's auto-start-for-i3 script. Unfortunately it doesn't work for me as expected. After some debugging efforts i figured out what cause the strange behavior.
With the following bash script i want to illustrate this:
test_startup.sh:
#!/bin/bash
i3-msg workspace "[t]ools"
for i in {1..4} ; do
galculator --class "galculator-${i}" &
done
If i execute this script from a running i3
session via rxvt
i3
switches to workspace [t]ools
and four instances of galculator
are opened on this workspace subsequently. Just as expected. Whereas galculator
stands for an arbitrary x-client.
If at the contrary i execute this script via the built in exec
command for example by invoking i3-input
:
exec test_startup.sh
the first instance of galculator
is opened on the workspace from that i invoked i3-input
and after that i3
switches to workspace [t]ools
and the remaining instances of galculator
are opened. So only three instances of galculator
are on [t]ools
. This means that the above line added to ~/.i3/config
yields the same result.
Is it a bug, that the two approaches to execute test_startup.sh
yields different results? Or is there anything wrong in my reasoning and i haven't considered a important point yet?
Thanks for your time and with best regards
Appendix 1 (19.09.2012)
I managed to install the latest version of the next
branch but the results are still unsatisfactory.
The instructions with which i want to define a workspace on startup looks like this (i placed the code in the shell script test_startup.sh
and test it via i3-input
with exec test_startup.sh
):
i3-msg workspace "test"
i3-msg exec thunar
i3-msg split v
i3-msg exec galculator
i3-msg exec urxvt
Unfortunately split v
seems to be a global setting for the workspace test
and all windows are arranged vertically no matter where i place this command, even if this command is appended to the last line.
Furthermore if i mix i3-msg split v
and i3-msg split h
instructions only the last one is crucial for the arrangement of the windows.
Is there a way to achieve the desired behavior i.e. have an arbitrary arrangement of windows on a specific workspace during startup?