Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running compiz 0.8.2 with compizconfig on Scientific Linux 6.2 with Gnome 2.28.2. In the compizconfig "General Options" I have "Desktop Size" set as follows:

  • Horizontal Virtual Size: 6
  • Vertical Virtual Size: 1
  • Number of Desktops: 1

This gets me the layout I want, i.e. 6 workspaces in a horizontal layout. Ctrl-alt-cursor-keys work fine for switching between them. However, I can't figure out how to get key bindings for specific workspaces. I've tried enabling "Viewport Switcher" in compizconfig, and tried various combinations both in "Number-based viewport switching" and "Go to specific viewport", to no apparent effect.

My first thought was that something else was eating the specific key bindings I chose, but I think I've tried every combination of shift, control, alt and super (i.e., the Windows key) by now.

I tried setting 6 desktops under "General Options" instead of one desktop with horizontal virtual size 6, but that doesn't seem to make a difference either.

What am I missing?

share|improve this question

1 Answer

up vote 3 down vote accepted
+50

The thread “Switch to specific workspace” shortcuts don't work after a reboot seems like it addresses your problem exactly.

It uses the fact that Compiz "workspaces" are actually viewports of a single workspace.

wmctrl -d is used to find out the size of the real workspace including all viewports. Dividing this by the number of viewports gives the size of one viewport in pixels. Then for example wmctrl -o 768,0 displays the viewport whose horizontal offset is 768 pixels.

The thread also describes how to use the Compiz Settings Manager to bind these wmctrl commands to keys.

share|improve this answer
Thanks! If you want +50 on unix.stackexchange.com, feel free to copy your answer over there. – David Moles Apr 9 '12 at 16:25
Done. (My first time on that forum) – harrymc Apr 12 '12 at 18:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.