[Xmonad] How to make mouse follow focus?

Devin Mullins me at twifkak.com
Wed Oct 24 00:03:05 EDT 2007

On Tue, Oct 23, 2007 at 09:54:13PM -0400, Xiao-Yong Jin wrote:
> It would be easy to do selection and paste with the mouse if
> it's near the window with focus.  Perhaps making the mouse
> move to the upper right corner of the window, when every
> time focus changes, is a good way to go?  If I understand it
> correctly, I probably need to do something with the
> layoutHooks?  Please help me to figure out how to achieve
> this, thanks.

Typing off the cuff, I'd think you'd want two things:
 1. Change the mod-j/k bindings to (windows W.focusDown >> someExpression)
    where someExpression involves some import from XMC.Warp
 2. Create a LayoutModifier that intercepts all mouse motion events
    (not just enter/exit) to change focus.

I could be totally wrong. It's late.


>     c/*    __o/*
>     <\     * (__
>     */\      <
Awesome, by the way.

More information about the Xmonad mailing list