[xmonad] multi-head bindings

Wirt Wolff wirtwolff at gmail.com
Fri Aug 13 21:42:52 EDT 2010


Excerpts from Brian Lewis's message of Fri Aug 13 14:28:12 -0600 2010:
> I have two monitors, left and right, and workspaces 1-6.
> 
> I'd like to configure xmonad so that when I go to workspace 1, I see
> workspace 1 on the left, focused, and workspace 2 on the right.
> 
> When I go to workspace 2, I'd like to see workspace 1 on the left, and
> workspace 2 on the right, focused.
> 
> When I go to workspace 3, I'd like to see workspace 3 on the left,
> focused, and workspace 4 on the right. And so on.
> 
> How can I do it? Thank you.

So basically three sets of paired workspaces. I'd look at the (pretty
sure it's darcs only) Actions.OnScreen module. You'd more or less
bind keys to exactly what you just described in English.

Something like (sorry haven't looked at the module docs in ages so this
is pseudocode/innacurate; there are probably helper functions that make
this shorter to write like viewOnScreen or sth like that)
...
("M-1", onScreen 1 view "2" >> onScreen 0 view "1")
("M-2", onScreen 0 view "1" >> onScreen 1 view "2")
("M-3", onScreen 1 view "4" >> onScreen 0 view "3")
....

Someone on #xmonad could probably help turn that into a list comprehension
if you want to get fancy and compress it into fewer lines.

good luck!
--
wmw


More information about the xmonad mailing list