How to create shortcuts for moving windows in Ubuntu (Unity)

May 18th, 2011

Ubuntu Unity is a smart attempt to bring innovation to the the desktop and program handling of Linux users. Actually Linux is far more user-friendly the people think, it has repositories since the last century, and if you don’t know what repository is. It’s an app-store. Yes, Linux invented the app store, this means you just have to search and click to install a trusted and tested program.

Why doesn’t anybody knows this? Because it’s free software, so it lacks advertisements budget, so it won’t make it into the newspapers, because newspapers nowadays are filled with advertisements on one side and press-releases and sensational breaking news on the opposite side. And if they write about innovation it’s about lifestyle and things you can buy.

Another strong  and catching feature is the Compiz, a window manager that brings 3D and hardware acceleration to your desktop. Scaling, fading, sliding of programs adds to the fun of daily work on your computer and it works amazingly fast and smooth. Off-course you need a graphics card, but most will do, like integrated Intel.

Unity doesn’t bring all the shortcuts you want, so how do you move program windows from one monitor to another, in a two monitor big desktop setup. Just install  wmctrl, you will find it in the Linux appstore. In short;

  1. Install  wmctrl

    sudo apt-get install <em>wmctrl</em>
  2. Open  CompizConfig Settings Manager (CCSM),

  3. or install it if you don’t have it:

    sudo apt-get install compizconfig-settings-manager
  4. Add this in the command settings

    wmctrl -r :ACTIVE: -e 0,1920,-1,-1,-1


    wmctrl -r :ACTIVE: -e 0,0,-1,-1,-1

  5. Add shortcuts to this commands in the next `key-binding`tab,

Now you can switch any program that has focus between monitors with your keyboard. Change 1920, if your left monitors doesn’ have that resolution and offcours you need a huge desktop setup with two monitors left and right. And the best, you don’t need Unitu for this it works in all Ubuntu versions with compiz, and even without compiz, you can set the commands with metacity.


Leave a Reply