4 ms·
Have you figured out how to make i3 move the mouse pointer to the area of the newly-focused window when you change window focus by keyboard? AwesomeWM does that
by abjKT26nO8 7y ago
Have you figured out how to make i3 move the mouse pointer to the area of the newly-focused window when you change window focus by keyboard? AwesomeWM does that out of the box. i3 doesn't and it's very annoying, because then when my table makes a microscopic movement and causes the mouse to move, suddenly what I'm typing is diverted to another window and weird things happen.
- jolmg 7y agoYou can fix that with: focus_follows_mouse no It doesn't do what you wanted, but I also can't see why anyone would want a window to focus simply because you hovered over it.
- zimmertr 7y agoI love that feature though!
- tmm 7y agoBecause why should I have to click to get focus? Less of an issue on a tiling window manager, but sometimes I really want to be able to type in a window without bringing it to the foreground. Also, selecting text should copy and middle click should paste. No one can convince me these things are bad or unnecessary.
- jolmg 7y ago> Because why should I have to click to get focus? The click not only focuses but is also passed on to whatever you clicked on, so it's like it was already focused. > Less of an issue on a tiling window manager, but sometimes I really want to be able to type in a window without bringing it to the foreground. I don't understand that. You have to somehow indicate to the system what it is you want to type on. > Also, selecting text should copy and middle click should paste. No one can convince me these things are bad or unnecessary. I'm 100% with you on that. Although saying "selecting text should copy" makes it sound like it's being copied when selecting, when it's actually copied when pasting.
- ubercow13 7y ago>You have to somehow indicate to the system what it is you want to type on You do it by moving the mouse. It makes the mouse more useful because you can now focus things with one less click. On the other hand, in what circumstance would you want to move your hand to the mouse, move it intentionally over another window without clicking, and _not_ focus it? What would be the point in moving the cursor?
- jolmg 7y ago> in what circumstance Precisely in the one that brought this into topic. It's nice to not have to be so careful with how the mouse moves. When it gets in the way, I can just flick it off, not worried about my stuff changing focus. It also greatly decreases the annoyance of accidentally touching a touchpad while typing.
- ubercow13 7y agoFair enough, that makes sense. In practice I don't ever find I make mistakes with the mouse and focusing, but then I am very good with the mouse (after playing those FPS games :)
- megous 7y agoi3wm does this for me. I don't see anything special in my config that would be enabling that. When I move to a window via keyboard, mouse will center on that window.
- abjKT26nO8 7y agoCould you share you config somehow?
- mjlee 7y agoAre you running a multi monitor setup? I've just tested it and it does centre on the window only if the window is on a different monitor.
- megous 7y agoMyabe that's it. Yes I do. Yeah, it only happens when changing focus to a window on a different monitor via keyboard.
- paulddraper 7y agoi3 does this, but only if the window is on a different screen. https://i3wm.org/docs/userguide.html#_mouse_warping https://i3wm.org/docs/userguide.html#_mouse_warping > By default, when switching focus to a window on a different output (e.g. focusing a window on workspace 3 on output VGA-1, coming from workspace 2 on LVDS-1), the mouse cursor is warped to the center of that window. > With the mouse_warping option, you can control when the mouse cursor should be warped. none disables warping entirely, whereas output is the default behavior described above. I agree that would be nice, though I've never really minded; If I'm gonna touch the mouse, I'm gonna touch the mouse.
- abjKT26nO8 7y ago> I agree that would be nice, though I've never really minded; If I'm gonna touch the mouse, I'm gonna touch the mouse. My problem is that my table isn't perfectly stable, so when I type, my mouse moves on its own by microscopic distances. When I'm in the middle of typing, the results range from mildly annoying to infuriating, depending on how a random application handles given input. I've just found this video describing a solution (writing a minimal script): <https://www.youtube.com/watch?v=7QeZkq88jTw> https://www.youtube.com/watch?v=7QeZkq88jTw>
- qu4z-2 7y agoI opened an issue about it in the past at https://github.com/i3/i3/issues/2971 https://github.com/i3/i3/issues/2971 . Apparently it's not on the roadmap, but someone posted an xdotool script in the comments that you can chain with every focus switching command in your i3config thusly: bindsym $mod+h focus left; exec --no-startup-id center-mouse I've been using that and it fixes the issue for me, even though it seems silly that it's not built-in given there's a mouse_warping config setting. That said, I thought i3's default behaviour was that it would only focus a window when the mouse entered it, not when the mouse was moving around within a window, so I'm surprised you're having that issue. For me I just got sick of my mouse being "way over there" in the odd situation I need it.