# GotoDesk

`GotoDesk` prev arg1 arg2 min max

Switches the current viewport to another desktop (workspace, room).

The command takes 1, 2, 3, or 4 arguments. A single argument is interpreted as a relative desk number. Two arguments are understood as a relative and an absolute desk number. Three arguments specify a relative desk and the minimum and maximum of the allowable range. Four arguments specify the relative, absolute, minimum and maximum values. (Desktop numbers can be negative). If a literal is given as the single argument, the last visited desk number is used.

If arg1 is non zero then the next desktop number is the current desktop number plus arg1.

If arg1 is zero then the new desktop number is arg2. (If arg2 is not present, then the command has no effect.)

If min and max are given, the new desktop number is no smaller than min and no bigger than max. Values out of this range are truncated (if you gave an absolute desk number) or wrapped around (if you gave a relative desk number).

The syntax is the same as for , which moves a window to a different desktop.

The number of active desktops is determined dynamically. Only desktops which contain windows or are currently being displayed are active. Desktop numbers must be between 2147483647 and -2147483648 (is that enough?).