New window tiling and snapping functionality
by mtwebster 32

Been a while since an update, we’ve all been in various states of busy-ness, vacationing, or otherwise occupied…but yesterday we merged new functionality into Cinnamon and Muffin that Clem has been discussing in the last few posts.  You can try it out by compiling Cinnamon and Muffin from  our github (here), or via glebihan’s nightly ppa.

A quick rundown of changes as a result of these merges:

  • There are now eight tile zones to use – 4 sides and 4 corners – correspondingly, you can tile half a window in any direction or a quarter window in the corners.
  • As you approach the edge of the screen with a dragged window, a heads-up-display or HUD-type indicator will appear along the edge or corner you’re near, indicating there is some action to be done if you continue to the edge.  If you wait a few seconds, a popup will show explaining the functionality (this can be disabled)
  • Reach the edge, and you’ll get a preview box of how the window will be tiled or snapped if you release it there.
  • You can hold a modifier key (defaults to Control) to toggle into “snap” mode – this is unique in that a snapped window will be considered part of the screen real estate, and maximized windows will avoid snapped windows.  Tiled windows (unmodified) are treated just as before – they are ‘stuck’ to the screen edge, but don’t receive any special treatment.
  • You can now use the arrow keys, left and right, to switch workspaces while dragging a window.  This (for now) replaces the edge-flip functionality that really didn’t play well with edge tiling.
  • There are new tiling and snapping keybindings that can be defined in Cinnamon Settings (in their own category in the keyboard page).
  • Snapped and tiled windows can be re-sized, while still retaining their tiled or snapped behavior.
  • There is a new tiling effect that can be customized in the Cinnamon Settings Effects page.
  • The colors used for the HUD are pulled from the current theme – we may eventually make this a fully themeable widget, but for now it should look pleasing in most themes.

There is also a new page in Cinnamon Settings – Window Tiling and Edge Flip – that allows you to:

  • Enable or disable edge tiling altogether (though the keybindings will always work).
  • Increase or decrease the proximity to the edge of the screen before the HUD activates.
  • Disable the snap on-screen-display.
  • Choose a different modifier for snap mode.
  • Enable edge-flip (this now is only effective for switching workspaces when not dragging a window)
  • Invert the arrow key directions for workspace flipping while dragging a window.
  • Re-enable old shift-drag snap behavior.

We felt this was ready for some broader testing, and hopefully it’s well-received.  We’ll make adjustments as needed based on feedback in the coming months.  I’m particularly interested in functionality on multi-monitor setups, as I have been unable to test in that situation so far.  It should work fine, but there may be some unintentional behavior there.


32 thoughts on “New window tiling and snapping functionality

  1. iveand Jul 11,2013 17:21

    I think I am understanding correctly that mouse “drag to an edge” tiling can be disabled BUT keybindings will continue to work? That will be excellent. I have been searching for a way to snap / tile windows with a keyboard only, but want to continue to have “drag to an edge” tiling disabled, especially for new-to-computers developing-country users.

    Also, the behavior of “non-snapped windows” not overlapping snapped ones seems very appealing. I will be eager to test this out and report back.

    Currently I am using the “gTile” extension, which is OK, but requires GUI clicking to define where to place the window.

    Thanks for the efforts.

  2. mtwebster Jul 11,2013 17:58

    That is correct – keybindings always work, but the edge mouse drag behavior can be disabled

  3. iveand Jul 11,2013 18:08

    I now have it installed and am testing on a spare machine (LTS: Mint 13 Maya 64bit).

    Looking good (the ‘thin band warning’ HUD when approaching the edge had me a bit confused, I would think the full scale preview outline of what shape the window will take would be adequate?)

    I am wondering about the plans for being able to do increments instead of just “half screen”. For example, left 1/4, 1/3, 1/2, 2/3, 3/4 of screen? Half-Half is often not what a user really needs. With keyboard shortcuts, other things like compiz have had the paradigm that “you hit it again” to toggle through the percentages. Would this be possible for Cinnamon? Or another way? I don’t know about how to do that with a GUI apart from how gTile does it (which is excellent, BTW), but maybe someone has an idea.

    Thanks again for the great work. This is going to be one of those killer features. I’ll keep testing.

    PS. off-topic, but in Maya 13, since Gnome Control Center is still around, it is confusing to have 2 “System Settings” in Mint Menu. I have to hack both .desktop files so that they are called “System Settings – Gnome” and “System Settings – Cinnamon” for users to tell them apart. Also, “Administration” and “Preferences” are strewn around alphabetically in the Mint Menu: they should be forced to the bottom so not interspersed with “normal applications” (Cinnamon 1.6.7 had this correct)…. I know…. “upgrade to newer Mint” is the answer, but just wanted to comment :-) Would it be appropriate to file a bug report, or are these things a “won’t fix” type of thing?

  4. mtwebster Jul 11,2013 18:16

    We did have additional sizes during development, but once we made them resizable we didn’t think it was necessary to have so many any more.

    As for gnome-c-c, hopefully in the near future, it can be removed entirely from Mint 13, as I’ve nearly fully backported cinnamon-c-c to work with Mint 13 (it’s actually available in the nightly ppa now I think) – the only sticking point is bluetooth at the moment.

    As for the Admin and Prefs being alphabetized, that was a result of us merging two different menu trees into one. The upside of this is that you can easily re-order them now in the menu editor, and show/hide anything in the menu. Previously, the Admin and Prefs menu items were inaccessible from the editor.

  5. iveand Jul 11,2013 18:30

    Thanks again for the replies (and even continuing to consider LTS users!)

    One more comment on “additional sizes” is that this really seems to be valuable to have (if possible) for someone relying on the keyboard shortcuts (only). Or else, it is back to the “hit a key command to initially resize then go and fidget around with a mouse to get the right size”. But I do see your point about it not being as necessary with edge-dragging to get 1/2 and then being able to re-size manually with another click drag on the window itself.

    I guess I’ll keep soap-boxing for the possibility of keyboard shortcuts being able to toggle through percentages :-), but do understand your difficulty in making it accessible to all.

    For a different look, a ‘keyboard only gTile option’ (where you have a pop-up overlay that will let you choose your location and size), you could possibly have it start “interactive” when summoned, then move with arrow keys to first square, then modifier key plus arrow keys to last square, then enter would do it. This would allow same dialog for “mouse or keyboard” as the problem up to this point is “mouse required for gTile”. Again I bring up gTile only because it is the only way I can think of for a visual “preview” of what will happen. Of course this dialog wouldn’t pop when you drag to an edge: edge dragging remains at 50% window.

    I may have introduced more complication above, again just “re-hitting the key combo” to toggle 1/2 to 1/4 to 1/3 to 1/2 to 2/3 back to 1/4, etc. would be more than good enough (while leaving edge-tiling unmodified at 50%)!

    OK, I will stop spamming now: just wanting to green light on some adjustments that would be AWESOME.

  6. JosephM Jul 11,2013 20:22

    As per request I just added this on my dual monitor setup to give it a shot. A little confused about a couple things. What exactly are the thin lined previews for? They cause problems when trying to tile the window in the area between the two monitors. They pop up when getting close to the border of the monitor but the area you have to hit to get the preview for the window to tile to say, half the screen, is so small it’s not useable. It works great on every other border where I can just butt the mouse cursor up against it and get the preview and proper tiling. This wasn’t an issue with the old “Aero Snap” feature. It was much easier to hit the proper area even between the two monitors.

    I also discovered a second issue. I currently have two monitors side by side with my panel on the bottom of the left hand monitor. When moving my mouse to the bottom corner of the area where the panel is and the two monitors meet, my mouse cursor gets stuck. To get the cursor to move to the other monitor I have to move it up off the area of the panel. A problem I might not have if I could have a separate panel on each monitor :).

    Overall, this feature is awesome. Just the fact that I can resize a tiled window makes my day. Any preset size, be it 50%, 25%, or whatever, is never quite what you need.

    • mtwebster Jul 11,2013 20:35

      Thanks for testing on multi-monitors.. sounds like I’ll need to work on it some.. I’m unsure whether tiling should even work on the ‘shared’ edge in a dual monitor setup. On the other hand, that then removes the edge and 2 corners from possible tile options, which isn’t great either.

      The mouse getting stuck is actually intentional (it’s been in cinnamon since the start afaik) – it’s a pointer ‘barrier’ at either end of the panel to make it harder to overshoot the panel into another monitor by accident.

      • JosephM Jul 11,2013 20:49

        Tiling really does need to work on the shared edge. It does with the old snapping feature and I use it constantly. I don’t know how this all works under the hood, but it just feels like I need a slightly larger area to hit. Playing around a bit more, the corner snapping between the two monitors isn’t bad. It’s mainly in the center trying to snap to one half of the monitor.

  7. Mani Jul 11,2013 21:38

    I know it is not really related to the threat, but i have a little question:
    If i build cinnamon from source: Do i still need gnome session to run it or does it already work without? (I have some sparetime next week and if i don’t need the gnome shell anymore i know what i am going to do^^)

    • mtwebster Jul 12,2013 00:32

      You need cinnamon-session now, as well as cinnamon-settings-daemon.

      So, if you’re going to build cinnamon, you need:

      cinnamon-control-center (not absolutely necessary but recommended)

      • Mani Jul 12,2013 07:10

        Cool, i am going to try it out on tuesday

      • Kirk M Jul 12,2013 14:31

        @mtwebster – Since the subject was brought up there’s been something I’ve been wondering about. I’m running the nightly builds PPA in LM15/Cinnamon and I’ve noticed that although “muffin-common” is installed, “muffin” is not. Since everything is running normally I’m assuming this is correct? If so, I’m just wondering what the difference is between the two.

        Otherwise. I’m really liking the new tiling and snapping features. Good job!

        • mtwebster Jul 12,2013 15:41

          This is indeed correct… there is a standalone ‘muffin’ but it is not used (except for maybe troubleshooting purposes.) Cinnamon is its own window manager, and uses the muffin libraries (muffin-common) to perform this task.

          This is why you can’t just use a different window manager or compositor with Cinnamon (or gnome-shell for that matter)

          • Kirk M Jul 16,2013 14:19

            Thanks for the reply. Now that you mention it I seem to remember this way back in beginning of Cinnamon development. Heh, that’s the trouble with getting up there in age I guess. :)

  8. samriggs Jul 12,2013 01:30

    cool can’t wait to try this one out, I been waiting for it.
    I’ll wait until it comes down the pipeline on lmde though.
    I use gimp and eclipse a ton and having them tile side by side will be perfect for my use.
    Thanks :)

  9. Anand Jul 12,2013 06:37

    A demo video could have been useful for folks who are dreaded for testing development builds.

  10. three_jeeps Jul 16,2013 14:26

    So, what exactly is Cinnamon???? How does it fix with Linux?

    Simple questions eh? You would think they would be answered in the first paragraph on the home page? Perhaps even the second paragraph. Wrong.
    The words “Traditional layout, advanced features, easy to use, powerful, flexible” convey absolutely nothing about its functionality/usage/intent.

    By sifting through all of the new ‘feature descriptions’ and down load and install information, one begins to get a sense of what it is but not a concise, precise description. One should not have to do this to begin to understand the software/project.
    Perhaps the authors of the web page contents are a little to close to their creation and need to take a perspective of a person completely unfamiliar with Cinnamon?

  11. chvnx Jul 16,2013 15:16

    Cinnamon is obviously a window manager, and if you didn’t already know that then it’s your fault for not paying attention.

  12. three_jeeps Jul 16,2013 17:46

    Thank you…you just proved my point…OBVIOUSLY??? No where on the front page are the words Window Manager used.
    In my professional career, I’ve ‘paid attention’ to more OSs and have done development work in them, probably forgotten more that you ever know. Droaning on and on about cutsey ‘desklets’, ‘applets’ and themes does dogsquat in explaining what overall functionality it provides.
    As to my previous point – get the perspective out of your own little sandbox and look at it from the world perspective. It order to do that, one would have to admit that what is conveyed on the homepage sux, which from the tone of your response blames the reader – a rather egotistical response.

    • mtwebster Jul 16,2013 19:02

      Just say that the website sucks (it absolutely could use improvement) and be done with it – the rest is just trolling. It was never initially meant as a standalone DE, so people heading to that website do so normally while already running Cinnamon, via Mint distributions.

    • clem Jul 18,2013 09:27

      The answer you got is definitely not appropriate. With that said, Cinnamon isn’t a standalone project with a standalone community and we’ve no intention to promote it on its own. It is built for a reason, by and for Linux Mint and made available to the Linux community as a whole.

      Neither Linux Mint or Cinnamon do a good job at promoting themselves via their respective websites. You definitely have a point on this. In the case of Linux Mint it’s something we want to improve, and we’ll probably describe the various DEs we’re using in details there. In the case of Cinnamon it is not considered urgent or even necessary.

      • Anand Jul 18,2013 16:21

        Hi Clem – It is not just about marketing. It is also about users making right choice while choosing the DE.

        Many of them are flummoxed by the options (am not saying it is wrong), it will be a good if there is a conscious effort to educate them. Also, there could be details about what hardware suits what DE. (XFCE as lightweight). – Screenshots and features. – Live experience. Perhaps bit tough to design and develop.

        Hopefully this will solve many forum queries like this ;-)

      • Rehdon Jul 25,2013 16:47

        (Apologies for a late reply)

        Reworking the LM/Cinnamon web sites will surely take time and resources, Clem, what you could do right now with very little effort is adding a short paragraph explaining what Cinnamon is at the top of the current site, for instance.

        While browsing applets, themes etc. I miss a way to organize them by date/popularity/compatibility: this sort of functionality is important when you’re looking for ways to enrich your Cinnamon desktop.


  13. Beluga Jul 25,2013 17:50

    Continuing on the off-topic of website overhaul, may I recommend Processwire as a CMS, if you decide on doing it from scratch? From the forums you will find lots of amazed and delighted ex-Wordpress, -Joomla and -Modx users.

  14. Rob Aug 27,2013 07:40

    I have done some cursory testing on a multi-monitor setup and it seems to work well. Is a feature planned to allow a hotkey to move a window between displays?

  15. markos Jul 29,2014 22:07

    I’d love to turn this (snapping etc) stuff off but how ( in linux mint 17)?


  16. David Aug 13,2014 19:04

    Great article! Quick question – how do you snap a window so that it goes full screen? Dragging to the top center only tiles the top half.

    • mtwebster Aug 13,2014 19:22

      You can configure that action to go ‘maximized’ instead of tiling the top half of the screen (In Settings->Window Tiling and Edge Flip), but not true fullscreen.

  17. mrman Mar 15,2015 12:04

    one of the things i really miss from xfce is the ability to control edge distance from workspace for windows. I would think this could go into the tiling menu on cinnamon.

    for those who dont know what that is, all it does is allow for a maximised window to be able to be custom set to not fully maximised but give a cm or two gap at each corner ( so you can still see some wall paper ) i often run my browser unmaximised with a frame so to speak as i have large monitor its all i need, on a phone i can understand but on a desktop .. not so much. Snapping 50% doesnt give the same effect.

    • mtwebster Mar 15,2015 12:51

      You can drag snapped windows to resize them (unless they’re using the new client-side-decorations from Gtk3) – so snap 50%, then resize to your preference.

Comments are closed.