0

I'm looking for a way to make my virtual desktop change without using keyboard shortcuts. I explain: I want to do a java program that will change my current desktop to the desktop at the left for exemple, let's say by clicking on a button. I've done it using keyboard shortcuts sent by the java program, but i want it more universal (i mean, that can work for everyone). Hope I'm clear enough! Thanks.

Karudosu
  • 89
  • 2
  • 11

1 Answers1

0

This will give you available workspace (virtual desktop) names:

wmctrl -d  

then

wmctrl -s <workspace name> 

will move to the workspace.

Take a look at here http://tomas.styblo.name/wmctrl/ to see what window managers are supported.

My previous answer was:

xrandr is probably what you want. Take a look at this wikipedia page here too.

I thought xrandr will work but couldn't figure out how. I hope someone will comment and give the definite answer whether xrandr will work or not.

Nylon Smile
  • 8,990
  • 1
  • 25
  • 34
  • Well it's not what i want but it's probably because i didn't explain well. xrandr rotates the displaying, i want to switch to another desktop that is on the same monitor, like when you use ctrl + alt + right arrow with compiz for exemple. – Karudosu Jan 10 '11 at 10:49