Disable Alt+Tab switcher grouping by script or command

In Ubuntu 12.04 (Precise Pangolin) with Unity, Alt + Tab lets you switch between groups of windows and makes it very annoying to switch to a specific window from a group when it is not the last window used.

One way to change this behaviour and get a plain Alt + Tab switcher showing all windows (without grouping) is to install ccsm (Compiz configuration settings manager), and enable the "static switcher" or something similar (can't remember exactly).

I need to modify this setting on several machines, so I don't want to install a complex package for this. (Particularly not when this package makes it easy for users to completely f*k up their system when changing the wrong settings).

So I'm looking for a reliable way to change this configuration, through one or more commands (gconftool?), or by modifying a configuration file directly.

Basically, I want to do directly on other machines what ccsm once did on mine to restore a sane and simple Alt + Tab behaviour.


Solution 1:

I was scared to use ccsm until I read this blog which makes it look like all that ccsm does is to edit the compiz .xml configuration files.

A search for compiz reveals:

~/.config/compiz-1
~/.config/compiz-1/compizconfig
~/.gconf/apps/compizconfig-1
~/.gconf/apps/compiz-1
~/.cache/compizconfig-1

I backed up these directories and then made then changed from "unity switcher" to "static application switcher" using ccsm as shown here

I then logged out and back in again and compared my backup to the changed system. Here are the results of diff -r compiz_before_change/ compiz_after_relogin/

CHANGED:

  • Binary file ~/.cache/compizconfig-1/place.pb
  • ~/.gconf/apps/compiz-1/general/screen0/options/%gconf.xml

    5c5
    <   <entry name="active_plugins" mtime="1354022954" type="list" ltype="string">
    ---
    >   <entry name="active_plugins" mtime="1354023761" type="list" ltype="string">
    70a71,73
    >       </li>
    >       <li type="string">
    >           <stringvalue>staticswitcher</stringvalue>
    
  • ~/.gconf/apps/compiz-1/plugins/unityshell/screen0/options/%gconf.xml

    2a3,5
    >   <entry name="alt_tab_forward_all" mtime="1354023761" type="string">
    >       <stringvalue>Disabled</stringvalue>
    >   </entry>
    

NEW:

  • ~/.compiz-1/session: 108caf9cb18e534392135401026619047100000017270046

These differences don't look big enough to me since I can't see anywhere that shows the keybindings which were changed, only the one which was disabled, so maybe compiz is a real pain and the change is in the binary file :-( Let's hope not!

I think if you expanded the backup and comparison, perhaps to the entire /home/ folder you would be able to find out which files contain the changes you want to make and then all you have to do is copy them from machine to machine.

Aren't human readable config files just awesome! :-D If compiz saves the settings in the binary file the coders who did that need a very stern talking to. >:-|

Good Luck.


P.S. In case your wondering, I actually made another backup of the same files after I had logged back in and then compared the two backups. It seemed quicker to me but then my brain does funny things sometimes ;-)