multi-head bindings

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.

Brian Lewis
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.
I think the XMonad.Layout.IndependentScreens module in -contrib does this. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Sat, Aug 14, 2010 at 08:56:33AM +1000, Ivan Lazar Miljenovic wrote:
Brian Lewis
writes: 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.
I think the XMonad.Layout.IndependentScreens module in -contrib does this.
It doesn't. With IndependentScreens, the screens are... well.... independent. Switching workspaces on one of the screens would not affect the other. -Brent

Brent Yorgey
On Sat, Aug 14, 2010 at 08:56:33AM +1000, Ivan Lazar Miljenovic wrote:
Brian Lewis
writes: 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.
I think the XMonad.Layout.IndependentScreens module in -contrib does this.
It doesn't. With IndependentScreens, the screens are... well.... independent. Switching workspaces on one of the screens would not affect the other.
Oh, right. Well, the you need to set up your keybindings to do both switches at the same time; using IndependentScreens might make this a little easier to work on (going on my vague recollection from last time I looked at the module...). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

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

On Friday, 13.08.10 at 19:42, Wirt Wolff wrote:
So basically three sets of paired workspaces. I'd look at the (pretty sure it's darcs only) Actions.OnScreen module.
Thanks, that's what I needed. What are people doing about toggleWS on multi-head? http://xmonad.org/xmonad-docs/xmonad-contrib/src/XMonad-Actions-CycleWS.html... I made a variant of toggleWS that uses the OnScreen focusing stuff I wrote, but it doesn't work like I expected. I think it's because the head of the 'hiddens' list isn't necessarily the workspace that was focused previously.
participants (4)
-
Brent Yorgey
-
Brian Lewis
-
Ivan Lazar Miljenovic
-
Wirt Wolff