Expansion and external tools

So I bought a flash...In GNOME bug 517722, a new keybinding is suggested which will make the focussed window take up as much space as possible without covering any other window.  If applied to all windows, it would make Metacity behave like a tiling window manager.

The main problem with this idea is the same one we were discussing almost a year ago: the same action can fairly easily be done using an external script and the EWMH.  So on the face of it there doesn’t seem to be much reason to add it into the window manager as well.

Of course, this could also be said of several of the less-used bindings, such as “move to southwest corner”.  Indeed, some have called for major keybindings such as alt-Tab to work this way.  The problem here is that external scripts are slow to start when the computer is overloaded: it’s important that alt-Tab keeps working even when the system load is high.  The same thing can’t be said of “move to southwest corner”, though.

Window managers which incorporate a programming language don’t have this issue, since a keybinding can be easily written to reconfigure a window in any way the user pleases, assuming the user is a programmer.  But Metacity aspires to be a lightweight window manager, and so does not provide this.

Both of these are reasons why your chronicler is not minded to accept this patch.  Perhaps both of these are arguments for moving keybindings such as “move to southwest corner” out to an external script as well, although we could say they are grandfathered.  Perhaps also there should be a general policy against anything that can be done in an EWMH script being accepted into Metacity in future.

The number of external EWMH scripts to do this kind of thing continues to rise. Mikkel Kamstrup Erlandsen has been working on putting a number of them together, including one to expand windows, and calling it WinWrangler.

Photo © widdowquinn, cc-by-nc-sa.


  1. strokinder
    Posted January 20, 2010 at 9:15 pm | Permalink

    I have never worked with a tiling window manager, so i have no real opinion on that subject. But i have worked some time with windows 7 in the last couple of days and i have to admit that aero snap is a really nice and comfortable feature. After doing some research about how to get a comparable functionality on linux my impression was that there are many people in the wild asking about aero snap for gnome. There are solutions and I have tried them but they don´t feel well integrated in the desktop.

    I think gnome would make a lot of people happy by offering some kind of equal functionality to aero snap.

  2. Posted January 20, 2010 at 9:18 pm | Permalink

    I haven’t heard of aero snap. Can you describe it?

  3. Steve K.
    Posted January 20, 2010 at 11:12 pm | Permalink

    Haven’t used Aero Snap, but my understanding is that it’s equivalent to “put left/right/top/bottom” in the Compiz grid plugin (i.e. a window is resized to fill up the left/right/top/bottom half of the screen), except that it’s triggered by dragging a window to whatever edge you want it to fill rather than by pushing a keybinding.

    I think what this guy is proposing is a “smarter” Grid, where the resizing isn’t fixed to 50% (although, personally, I much prefer the way Grid does it).

  4. Steve K.
    Posted January 20, 2010 at 11:19 pm | Permalink

    Oh, and strokinder:

    Grid is really great, a *huge* increase in comfort over manually resizing windows in Metacity — open up a terminal & super-alt-left, open up a browser & super-alt-right, and those two windows now fill the whole screen. I don’t care a bit about anything else in Compiz, but I’m seriously going to hunt down and pummel someone if that functionality gets taken away from me in Gnome 3.

  5. Posted January 20, 2010 at 11:46 pm | Permalink

    If I understand correctly, that could be fairly easily done with an external tool. You just have to monitor ConfigureNotify on the root window thus:


    Of course you then need some way of picking up that a window had touched the hotspots, and you need to add some kind of payload, but the bones of it are there. If I get a more exact specification, and anyone’s interested, I might write the rest of it.

  6. Steve K.
    Posted January 21, 2010 at 12:44 am | Permalink

    Cool. I’m not personally interested, but my impression is that there’s tons of people drooling over Aero Snap.

  7. Steve K.
    Posted January 21, 2010 at 12:51 am | Permalink


    Results 1 – 100 of about 22,000 for aero snap gnome
    Results 1 – 100 of about 60,600 for aero snap ubuntu
    Results 1 – 100 of about 204,000 for aero snap linux

  8. strokinder
    Posted January 21, 2010 at 5:03 pm | Permalink

    I let a short YouTube video speak for myself. Basically its very simple and no big deal, but like Steve K. showed in #7 there is a lot of demand by users.

    So here is the video http://www.youtube.com/watch?v=XVV-KG3q7gM&hd=1

  9. strokinder
    Posted January 21, 2010 at 5:17 pm | Permalink

    Just look at this tutorial i found on the net here http://www.omgubuntu.co.uk/2009/11/aero-snap-ubuntu-linux.html

    In reality you just have to copy + paste the command line string into the appropriate fields. But it looks really difficult and in the end it has some design flaws. In Windows 7 the resizing is only applied when the user releases the mouse button. With the Ubuntu solution the resizing will apply immediately when dragging a window to the left or righ side. Especially problematic when you want to drag a window onto the next workspace.

  10. Posted January 26, 2010 at 7:24 am | Permalink

    I filed a bug report against WinWrangler (of which I am the maintainer) https://bugs.launchpad.net/winwrangler/+bug/512669. If anyone wants to have a go on this daemon-side approach Thomas suggests I will do my best to help out. It’s unlikely that I’ll have time to look at this myself in the near- to mid term future…

One Trackback

  1. By Snap – …for the adult in you on January 21, 2010 at 6:07 pm

    […] has been some discussion on the last post about implementing functionality similar to Microsoft’s “Aero Snap”.  Your […]