Next: , Previous: , Up: Workspaces   [Contents][Index]


12.2 Workspace Manipulation

Sawfish has various functions to create, rearrage and delete workspaces. Windows in a deleted workspace are not lost; they are moved to another workspace.

Function: select-workspace space &key dont-focus force

Activate workspace space, making it current.

By default in enter and click focus modes, the most recently used window will receive focus. The caller can disable this behavior by passing a true dont-focus keyword argument.

If the force keyword argument is true, we will go through the activation process even if space already is current.

Function: select-workspace-from-first count

Select the workspace in position count from the list of “interesting” workspaces.

Function: select-workspace-and-viewport space col row

Select workspace space and then switch to viewport (col, row) in that workspace.

Function: insert-workspace #!optional after

Insert a new workspace, returning its index. The new index appears after the workspace indicated by after, or the current workspace if after is nil.

Function: insert-workspace-after

Create a new workspace following the current workspace.

Function: insert-workspace-before

Create a new workspace preceeding the current workspace.

Function: move-workspace space count

Move the workspace space count positions forward, or count positions backwards if count is negative.

Function: move-workspace-forwards #!optional count

Move the current workspace one place to the right (or count places to the right if count is defined).

Function: move-workspace-backwards #!optional count

Move the current workspace one place to the left (or count places to the left if count is defined).

Function: next-workspace count
Function: previous-workspace count

Switch from the current workspace (index i) to the workspace i+count. The previous-workspace function is identical to (next-workspace (- count)).

These functions do not have default values for their count arguments.

Function: remove-workspace #!optional index

Remove workspace index (or the current workspace if index is nil). All windows in that workspace are moved to the next workspace index+1. This will change the set of “interesting” workspaces.

Function: merge-next-workspace

Delete the current workspace. Its member windows are relocated to the next workspace.

Function: merge-previous-workspace

Delete the current workspace. Its member windows are relocated to the previous workspace.

Function: set-number-of-workspaces wanted

Add or remove workspaces until the number of “interesting” workspaces is equal to wanted.

When adding workspaces, the new workspaces get indices higher than any existing indices. When removing workspaces, the lowest workspaces are always chosen for removal (their windows are merged into the new lowest-index workspace).

Variable: lock-first-workspace

When true, preserve the outermost empty workspaces in the pager. Don’t quietly remove them when they become empty. Defaults to true.


Next: , Previous: , Up: Workspaces   [Contents][Index]