changing the alt-tab behaviour in Ubuntu

In Ubuntu 14.04, application switching using alt-tab by default groups all windows of the same type together, instead of cycling through the individual windows. This makes no sense!

To fix the default behaviour you will need to install the compiz settings manager and some additional plugins:
$ sudo apt-get install compizconfig-settings-manager
$ sudo apt-get install compiz-plugins
$ sudo apt-get install compiz-plugins-extra
Now start the settings manager either from the menu or the command line:
$ ccsm
In the settings manager go to Desktop->Ubuntu Unity Plugin and open the Switcher tab. Here, disable the top two keys: "Key to start the Switcher" and "Key to switch to the previous window in the Switcher" by clicking on their short-cut button and unchecking the enabled checkbox. This disables the default window switching behaviour.

Now go back to the main window and go to Window Management. Check the Static Application Switcher checkbox. This may cause a pop-up to appear that warns you about conflicting key bindings, you can ignore this pop-up and go to the settings of the Static Application Switcher by clicking on it. Here set the keyboard short-cuts for previous/next window to alt-tab and alt-shift-tab. Alternatively you can bind these short cuts to Next/Prev window (All windows) to also cycle through windows from other workspaces. The alt-tabbing will now look like this:

static switcher in action

That's it, you can now enjoy sane alt-tabbing again!