[xmonad] Changing workspace using the mouse

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Mon Jan 4 11:01:41 EST 2010


You might be interested in checking out the documentation for mouseBindings:
http://xmonad.org/xmonad-docs/xmonad/XMonad-Core.html#v%3AmouseBindings
For example, I could imagine setting up left click+scroll to move the  
focused window up and down the stack, and right click+scroll to move  
the focused window up and down the workspace list.  Untested example  
follows:

import Data.Map
import XMonad.Actions.CycleWS
import XMonad.StackSet

main = xmonad defaultConfig {
   mouseBindings = const $ fromList [
     ((button1Mask, button4), const (windows focusUp)),
     ((button1Mask, button5), const (windows focusDown)),
     ((button2Mask, button4), const (shiftToPrev >> prevWS)),
     ((button2Mask, button4), const (shiftToNext >> nextWS))
   ]
}

Quoting "Ian D. Leroux" <idleroux at fastmail.fm>:

>
> I'm interested in using the mouse to navigate between windows, while
> retaining the benefits of tiled window management (I hate resizing
> windows by hand).  Xmonad already lets me change the focus within a
> workspace with the mouse.  Is there any way (possibly using an extension
> or by interaction with an external tool) to use the mouse to switch
> workspaces?  How about rearranging windows within a (tiled) workspace? I
> haven't found anything relevant in the documentation or the list
> archives, but I might not be searching for the right thing.  If no such
> capability currently exists, do you have any tips on where I should
> start if I want to try writing my own?
>
> Thanks,
>
> --
> Ian Leroux
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad
>
>




More information about the xmonad mailing list