Xmonad - open a window to a specific slab

I have three terminals running monitor commands that are loaded at login. I have a workspace set up by default, 2/3 on the left, 1/3 on the right, with right 1/1 tiles vertically. I would like to control which tile each terminal lands from xmonad.hs, but I'm not sure what functionality I need to use. I guess the new Mangehook will be fine, but other than that I'm lost.

Any pointers are gratefully accepted.

TIA

+3


source to share


1 answer


I am currently using a dirty hacked application spawning lag:

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

      

The Know-it-all Hycosaurus in the Channel #xmonad

pointed out that you can also do

spawnAndDo  (doShift "workspace" <+> doF W.shiftMaster) "app"

      

but it works well if you want one application in the master and one in the slave. Otherwise, you will face the same problem as before ...



Please see also XMonad.Hook.InsertPosition

from the contrib package. With it, you can override the default position where the new window is added - maybe this is useful for you.

Edit: I came up with another method: for placement mutt

in the top left corner, newsbeuter

bottom left and irssi

on the entire right side, I combine layouts and sort the placement (getter on the master or slave) by ComboP

. To place the mutt on top, I use the Geekosaurs tooltip on top.

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 the docs to change the settings you need: XMonad.Layout.ComboP

, XMonad.Layout.TwoPane

.

+3


source







All Articles