GNOME Bugzilla – Bug 152661
Switching to window in direction
Last modified: 2010-01-20 15:32:13 UTC
One thing I miss in Metacity which I had in FVWM is the ability to switch to a window in <direction>, where <direction> is (up|down|left|right). This is already possible for workspaces in Metacity, so wouldn't it be logical to support it for windows aswell?
Yeah, we could user Super-Hyper-Ctrl-Alt-Arrow for the keybinding! ;-)
There are so many other ways to access a window that's already on the same workspace, though. What are the use cases for which the requested feature would be more efficient to use than the existing methods?
If such an option could really be useful then perhaps it would be really useful to be able to use arrows once inside alt+tab interface and mark this one as wontfix?
This is actually immensely useful, and the one reason I can't use metacity on my main development box. They way it works is this: I have a number of xterms of various sizes tiled across a number of desktops. By default in Gnome (and metacity), I can switch between desktops linearly, and between windows on desktop linearly. This means that if I want to get to desktop 8 and I'm on desktop 4 (I use 9 desktops...), I have to move through 4 or 5 desktops (4->5->6->7->8 or 4->3->2->1->9->8). Simiarly, if I have 6 terms on a desktop (not uncommon...) I have to move through them linearly. However, I can lay out my desktops in 2D. This means that to get from 4 to 8 above, it's 2 moves (right and down). Similarly, if I have 6 terms, I can move from any one to any other in only 2 moves (3 if I can't wrap). Much more importantly than number of keystrokes, however, is the difference in mentality that this allows. With a 2D desktop and directional window switching, I can lay out my desktops in 2D, lay my windows out tiled (ie, non-overlapping) in 2D on each desktop, and the result is that I can use pure spacial memory for finding everything open on a huge virtual desktop. I can easily have 20 or 30 windows open total (again, not uncommon for me) on a single monitor, and find them all quickly and easily. That cannot be done (at least by me) in metacity, because I cannot use spacial memory to find things. Please consider adding this feature, or at least making it possible for devilspie to add such a feature. This would allow me to run metacity again, rather than fvwm or awesome, on my development machines.
Created attachment 127506 [details] Perl script to move in a direction from the current window But it already is possible for devilspie to have such a feature. In fact, anyone can write a script to do it-- here's one I just threw together. Install X11::Protocol ("sudo cpan X11::Protocol"), put this script in your path as "metacity-direction", open gconf-editor, and set four appropriate keybindings to "metacity-direction e", "metacity-direction s", "metacity-direction w", and "metacity-direction n".
I think that makes this FIXED.
Created attachment 127558 [details] Version of perl script honoring current desktop That's almost exactly what I want, thanks. The only problem is that it selects windows not on the current workspace, moving them to the current workspace. This version only selects from windows on the current workspace. As far as I'm concerned, this is now fixed.
I tried both versions of the fix script, and they both fail in the exact same way: $ ./metacity-direction.pl w Desktop: 0 Protocol error: bad 5 (Atom); Sequence Number 16 Opcode (17, 0) = GetAtomName Bad resource 0 (0x0) at ./metacity-direction.pl line 44 (Daniel's script fails on line 44 while Thomas's fails on line 43) (FWIW, I run Ubuntu 9.10) I desperately need this feature. I have several xterms open, and it's really tough to navigate between them. thanks!
guys, any idea about the script bug ? or do you have any idea how can I achieve this differently with MetaCity ? I'd hate to move to another window manager just because of such a simple feature need... thank you
ok, i'm happy to say i got it working now. probably something in my configuration is just non standard. anyway, it's a great great script, i have it now bounded with 4 movements keys, and i'm very happy. thank you all for the great support.
Sorry I didn't get to this in time! I'm glad it's working for you now. (If you ever do move to another window manager, the script should work there as well.)