[xmonad] Flip workspaces using a multihead display

Norbert Zeh nzeh at cs.dal.ca
Wed Oct 14 17:58:04 EDT 2009


On Wed, Oct 14, 2009 at 05:32:48PM -0400, Ones Self wrote:
> Hi,
> 
> I use two monitors on my machine.  I often find that I'd like to
> switch the workspace on the right with the one on the left, and
> the left with the right. This currently takes two key strokes which
> change depending on which side I happen to be focused on,
> and which workspaces I'm currently viewing.  Which is annoying.
> 
> Can I add a single key stroke to achieve this?
> 
> Thanks,

Here's my setup (Mod-Shift-space does what you want):

As part of my keybindings:

((modMask .|. shiftMask, xK_space), windows $ withOtherWorkspace W.greedyView)

withOtherWorkspace is defined as

withOtherWorkspace f ws = f (otherWorkspace ws) ws
    where
        otherWorkspace = W.tag . W.workspace . head . W.visible

Cheers,
Norbert


More information about the xmonad mailing list