Currently i'm using a dirty hack by lagged spawning of the applications:
myStartupHook = do
spawnOn "workspace" "app3"
spawnOn "workspace" "sleep 0.5; app2"
spawnOn "workspace" "sleep 1; app1" -- will be placed in master if default not changed, see last paragraph
Mr. Know-it-all Geekosaur in the #xmonad
channel pointed out that you can also do
spawnAndDo (doShift "workspace" <+> doF W.shiftMaster) "app"
but this only works well if you want one app in master and one in slave. Otherwise you run into the same issue as before...
Please have also a look at XMonad.Hook.InsertPosition
from the contrib package. With it's help you can redefine the default position where a new window is added - maybe this is helpful for you.
Edit: I came up with another method: For placing mutt
top left, newsbeuter
bottom left and irssi
on the whole right side i combine layouts and sort the placement (wheter on master or slave) by ComboP
. For placing mutt on top i use Geekosaurs hint from above.
Relevant code:
import XMonad.Layout.TwoPane
import XMonad.Layout.ComboP
...
myLayout = combineTwoP (TwoPane (3/100) (2/3)) (Mirror $ ResizableTall 1 (3/100) (2/3) []) (ResizableTall 1 (3/100) (1/2) []) (Title "mutt" `Or` Title "newsbeuter")
Check out the docs to modify my setup fitting you needs: XMonad.Layout.ComboP
, XMonad.Layout.TwoPane
.