Changing workspace using the mouse

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

* On Monday, January 04 2010, Ian D. Leroux wrote:
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
Have you tried xmonad's EWMH integration? Once you use the module [1] to your config, you can move windows between workspaces using the pager in say gnome-panel. [1] http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Hooks-EwmhDesktops.html -- Adam

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"
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@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

You should also take a look at XMonad.Layout.WindowSwitcherDecoration, which allows you to swap windows in the tiling order by dragging one on top of another. -Brent On Mon, Jan 04, 2010 at 11:01:41AM -0500, Daniel Wagner wrote:
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"
: 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@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

* On Monday, January 04 2010, Brent Yorgey wrote:
You should also take a look at XMonad.Layout.WindowSwitcherDecoration, which allows you to swap windows in the tiling order by dragging one on top of another.
-Brent
These modules are integrated (with a couple more), in XMonad.Config.BlueTile, which may or may not be easier considering that the order in which you compose various extensions does matter, and is otherwise not very well documented in comparison to the rest (this being something that should be addressed?). -- Adam

On Mon, 4 Jan 2010 15:35:00 -0500
Adam Vogt
* On Monday, January 04 2010, Brent Yorgey wrote:
You should also take a look at XMonad.Layout.WindowSwitcherDecoration, which allows you to swap windows in the tiling order by dragging one on top of another.
I thank you all for helpful suggestions. It looks like what I want is definitely possible; now I just have to see whether it's a good idea. -- Ian Leroux
participants (4)
-
Adam Vogt
-
Brent Yorgey
-
Ian D. Leroux
-
wagnerdm@seas.upenn.edu