Ratpoison style focus

Hi xmonad friends, I am a long time orphan of ratpoison, and after trying ion3, dwm, awesome and many others I finally settled on xmonad + kde. Simple to configure and a joy to use. Great work. The only thing that still bothers me is not having ratpoison-style focus, which means separated mouse and keyboard focus. I find it very useful for writing code in my xterm (konsole, actually) while I use gmail from a browser in another window. This prevents long mouse trips between the browser and the terminal (and these monitors keep getting bigger and bigger). Any hints? Is this something possible to achieve with existing contrib extensions? I couldn't find anything. -- []s Davi de Castro Reis

On 14 May 2010 13:57, Davi Reis
The only thing that still bothers me is not having ratpoison-style focus, which means separated mouse and keyboard focus. I find it very useful for writing code in my xterm (konsole, actually) while I use gmail from a browser in another window. This prevents long mouse trips between the browser and the terminal (and these monitors keep getting bigger and bigger).
Not sure I follow what you're asking for here. Is there any reason you don't use keybindings to switch windows/screens? One thing that I've found that helps with this is the XMonad.Layout.WindowNavigation module. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

There's the "focusFollowsMouse" option, there are keybindings for
modifying the focus in the default configuration, and there are
contrib modules for moving the pointer relative to the currently
focused window or screen (in X.A.Warp and friends). Do these handle
your wishes?
~d
Quoting Davi Reis
Hi xmonad friends,
I am a long time orphan of ratpoison, and after trying ion3, dwm, awesome and many others I finally settled on xmonad + kde. Simple to configure and a joy to use. Great work.
The only thing that still bothers me is not having ratpoison-style focus, which means separated mouse and keyboard focus. I find it very useful for writing code in my xterm (konsole, actually) while I use gmail from a browser in another window. This prevents long mouse trips between the browser and the terminal (and these monitors keep getting bigger and bigger).
Any hints? Is this something possible to achieve with existing contrib extensions? I couldn't find anything.
-- []s Davi de Castro Reis _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Hi Wagner, Ivan,
Thanks for the answers, but none of these are what I am looking for.
Ratpoison was unique in this regard, so it is a bit hard to understand
the behavior without seeing it. Here is an example:
Suppose I have two windows in a single workspace, both visible at the
same time (e.g., vertical tiled). One of them is xterm and the other
is firefox. My focus is on xterm and I am typing something. Then I
decide to click a link on the browser. When I start to type again, I
want the keys to go directly to xterm, without needing to move the
mouse to give xterm the focus, or using some shortcut (e.g., mod+j) to
move the focus back to xterm.
In other words, I want mouse actions to have no influence on the
focus. Pretty much the opposite of focus-follow-mouse (when you use
the mouse) and pointer-follows-focus (when you use the keyboard).
On Fri, May 14, 2010 at 1:38 AM,
There's the "focusFollowsMouse" option, there are keybindings for modifying the focus in the default configuration, and there are contrib modules for moving the pointer relative to the currently focused window or screen (in X.A.Warp and friends). Do these handle your wishes? ~d
Quoting Davi Reis
: Hi xmonad friends,
I am a long time orphan of ratpoison, and after trying ion3, dwm, awesome and many others I finally settled on xmonad + kde. Simple to configure and a joy to use. Great work.
The only thing that still bothers me is not having ratpoison-style focus, which means separated mouse and keyboard focus. I find it very useful for writing code in my xterm (konsole, actually) while I use gmail from a browser in another window. This prevents long mouse trips between the browser and the terminal (and these monitors keep getting bigger and bigger).
Any hints? Is this something possible to achieve with existing contrib extensions? I couldn't find anything.
-- []s Davi de Castro Reis _______________________________________________ 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
-- []s Davi de Castro Reis

Davi Reis
Hi Wagner, Ivan,
Thanks for the answers, but none of these are what I am looking for. Ratpoison was unique in this regard, so it is a bit hard to understand the behavior without seeing it. Here is an example:
Suppose I have two windows in a single workspace, both visible at the same time (e.g., vertical tiled). One of them is xterm and the other is firefox. My focus is on xterm and I am typing something. Then I decide to click a link on the browser. When I start to type again, I want the keys to go directly to xterm, without needing to move the mouse to give xterm the focus, or using some shortcut (e.g., mod+j) to move the focus back to xterm.
In other words, I want mouse actions to have no influence on the focus. Pretty much the opposite of focus-follow-mouse (when you use the mouse) and pointer-follows-focus (when you use the keyboard).
Well, you can disable focus-follows-mouse... but I think clicking with it might set the focus (not too sure about this). Completely removing the mouse pointer from the equation of focus might be possible, but I don't know enough of XMonad's details to be able to answer this definitively. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Fri, May 14, 2010 at 8:18 AM, Ivan Lazar Miljenovic
Davi Reis
writes: Hi Wagner, Ivan,
Thanks for the answers, but none of these are what I am looking for. Ratpoison was unique in this regard, so it is a bit hard to understand the behavior without seeing it. Here is an example:
Suppose I have two windows in a single workspace, both visible at the same time (e.g., vertical tiled). One of them is xterm and the other is firefox. My focus is on xterm and I am typing something. Then I decide to click a link on the browser. When I start to type again, I want the keys to go directly to xterm, without needing to move the mouse to give xterm the focus, or using some shortcut (e.g., mod+j) to move the focus back to xterm.
In other words, I want mouse actions to have no influence on the focus. Pretty much the opposite of focus-follow-mouse (when you use the mouse) and pointer-follows-focus (when you use the keyboard).
Well, you can disable focus-follows-mouse... but I think clicking with it might set the focus (not too sure about this).
Completely removing the mouse pointer from the equation of focus might be possible, but I don't know enough of XMonad's details to be able to answer this definitively.
Here are some ideas for getting xmonad to focus as you describe: I don't know if you can implement what you want outside of modifying xmonad's core, but I would try to use the handleEventHook to intercept those specific mouse clicks be used to stop xmonad from responding to mouse clicks in unfocused windows. When the event matches your specific focus case, return (All False). If that doesn't work out, and you must modify the core of xmonad, it might be helpful to look at what this patch does, as it results in mouse an d keyboard focus being different in a specific case: http://code.google.com/p/xmonad/issues/detail?id=177#c33 -- Adam
participants (5)
-
adam vogt
-
Davi Reis
-
Ivan Lazar Miljenovic
-
Ivan Miljenovic
-
wagnerdm@seas.upenn.edu