8

Strangely, my openbox default rc.xml file has keyboard shortcuts for the commands DesktopDown and DesktopUp, but it seems that the only configuration option for the desktops is their number (which is interpreted as a linear setup of all the desktops, and you can navigate only right and left).

I'm very much accustomed to having a 2x2 grid of desktops... Is there any way to do that within openbox ? (I'm open to installing other things. I'm even expecting to have to, I just don't know what.)

glmxndr
  • 181

2 Answers2

7

Took me a while but now I found a workaround. openbox.org wiki FAQ linked to a tiny program (called setlayout) which is doing the job

You have to compile it with:

  1. sudo aptitude install libx11-dev
  2. gcc setlayout.c -o setlayout -lX11

Call it with: ./setlayout 0 2 2 0

Garrett
  • 4,217
  • 1
  • 24
  • 33
2

Credit to strangeqargo who pasted a link to this answer in a comment on the first answer

As stated in the above, you can avoid having to download, compile, and use setlayout by using the xprop command.

Examples

To get 4 columns x 2 rows:

xprop -root -f _NET_DESKTOP_LAYOUT 32cccc -set _NET_DESKTOP_LAYOUT 0,4,2,0

Set number of workspaces/desktops to 8:

xprop -root -f _NET_NUMBER_OF_DESKTOPS 32c -set _NET_NUMBER_OF_DESKTOPS 8

The exact specification for _NET_DESKTOP_LAYOUT is available here

This is a lightly edited version of the Original answer

jmetz
  • 931