Window throwing in OS X and Ubuntu

When I first switched from OS X to Ubuntu for my daily development work, one of the things I missed a lot was Divvy.

“Window throwing” is the purpose of Divvy (and Spectacle, which I later replaced it with). With a single keyboard shortcut, I can make the foreground window fill the right half of the screen. Or the left half. Or the bottom right quadrant. Or the whole screen. Any rectangle I care to define. I can even send it to the other monitor.

Once I had gotten used to this power, I was hooked. Manual resizing and repositioning of windows with the mouse felt fiddly and inexact. Like trying to align icons on your desktop by eye. Bother.

On Linux I hunted around for a while before finding out that the Compiz system has a Grid plugin for this sort of thing. Divvy’s window size/position options are more granular, but Compiz gets it done.

Then, probably a year later I discovered the solution I currently use in Ubuntu: Unity actually has built-in keyboard shortcuts for window placement. They use the numeric keypad and they go like this:

  • ctrl-alt-1: lower left quadrant
  • ctrl-alt-2: bottom half
  • ctrl-alt-3: lower right quadrant
  • ctrl-alt-4: left half
  • ctrl-alt-5: full screen
  • ctrl-alt-6: right half
  • ctrl-alt-7: upper left quadrant
  • ctrl-alt-8: top half
  • ctrl-alt-9: upper right quadrant

Look at the layout of the keypad and you’ll see these are their own perfect mnemonics.

One final note: anybody who has ever used a tiling window manager like Xmonad is familiar with the pleasure of instant and exact window control via keyboard. I use Xmonad as well and love it. (I just had to mention this because if I didn’t, somebody would be like DO YOU EVEN XMONAD DUDE)



Share: