[xmonad] How to swap screen in a multihead environment?

Daniel Schoepe daniel.schoepe at googlemail.com
Sat Aug 29 07:48:52 EDT 2009


On Sat, Aug 29, 2009 at 12:37:27PM +0200, Felix Bou wrote:
> At his moment, I am using two physical screens and I would like to use
> a key binding to do the following thing: "swap screens".
> 
> By swap screens I mean moving from
>   -the configuration [1 2] to the configuration [2 1]
>   -the configuration [1 3] to the configuration [3 1]
>   -the configuration [4 2] to the configuration [2 4]
> etc
> When I say configuration [1 2] I mean that workspace 1 is on left
> screen and workspace2 in on right screen; and the same idea for [2 1],
> [1 3], etc

This should work:

import Data.Maybe

..
swapScreens = do
  screen <- gets (listToMaybe . W.visible . windowset)
  whenJust screen $ windows . W.greedyView . W.tag . W.workspace
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090829/fb706542/attachment.bin


More information about the xmonad mailing list