How do I use "Initiate Window Picker for window group" in Compiz?

I use Unity and Compiz on natty. I have Scale and Scale Addons enabled.

I set CompizConfig Settings Manager > Scale > Bindings > Initiate Window Picker for window group to set my keyboard shortcut for "Initiate Window Picker for window group" to Super+grave (using grab key combo). If I open several gnome-terminal windows and hit Super+grave, nothing happens. Same for empathy, nautilus, gimp, and chromium. I've also tried binding to Super+a.

How does this feature work? What am I doing wrong?

I expect it to work like Application level Expose on a Mac where it lets you switch through all windows from a specific program (all Finder windows or all Chromium windows).

Static Application Switcher's "Next window (group)" feature works as expected.


Solution 1:

This is a reported bug.

If you experience this bug, please select "This bug affects 7 people" and pick "Yes this bug afects me".

Solution 2:

Meanwhile, in the bug report there is a workaround which works for me:

Prabhjot (prabhjotsbhatia) wrote on 2011-11-08: #8

A workaround:

Hi, I got it working using the "Commands" plugin and "DBus" plugin enabled.
I use the following bash script as the command:
1. Go to command plugin in the Compiz config settings manager.
2. In one of the commands, enter this:

dbus-send --print-reply --type=method_call \
    --dest=org.freedesktop.compiz /org/freedesktop/compiz/scale/screen0/initiate_key \
     org.freedesktop.compiz.activate string:'root' int32:`xwininfo -root |
     grep id: | awk '{ print $4 }'` string:"match" string:$(xprop -id \
     `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'` |
     grep "WM_CLASS" | cut -d\" -f4 | awk '{print "class=" $1 }')

In bindings, bind that command to a screen edge or button or keystroke, as you deem fit. Voila!! You have the Scale plugin for the same application class

Note: you need Scale, DBus, Commands plugins enabled. You'd also need to install awk if it isn't installed by default. This works one way and to get out of the scale mode, press Esc or select a window.

For Ubuntu 12.04, add --reply-timeout=1 to the dbus-send command to avoid being stuck within scale.