You can use this module with the following in your ~/.xmonad/xmonad.hs:
import XMonad.Layout.IndependentScreens
You can define your workspaces by calling withScreens:
myConfig = defaultConfig { workspaces = withScreens 2 ["web", "email", "irc"] }
This will create "physical" workspaces with distinct internal names for
each (screen, virtual workspace) pair.
Then edit any keybindings that use the list of workspaces or refer
to specific workspace names. In the default configuration, only
the keybindings for changing workspace do this:
[((m .|. modMask, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
This should change to
[((m .|. modMask, k), windows $ onCurrentScreen f i)
| (i, k) <- zip (workspaces' conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
In particular, the analogue of XMonad.workspaces is
workspaces', and you can use onCurrentScreen to convert functions
of virtual workspaces to functions of physical workspaces, which work
by marshalling the virtual workspace name and the currently focused
screen into a physical workspace name.
|