Node: Workspace Manipulation, Next: , Previous: Workspace Intervals, Up: Workspaces



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.

select-workspace space &key dont-focus force Function
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.

select-workspace-from-first count Function
Select the workspace in position count from the list of "interesting" workspaces.

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

insert-workspace &optional before Function
Insert a new workspace, returning its index. The new index appears before the workspace indicated by before, or the current workspace if before is nil.

insert-workspace-after Function
Create a new workspace following the current workspace.

insert-workspace-before Function
Create a new workspace preceeding the current workspace.

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

move-workspace-forwards &optional count Function
Move the current workspace one place to the right (or count places to the right if count is defined).

move-workspace-backwards &optional count Function
Move the current workspace one place to the left (or count places to the left if count is defined).

next-workspace count Function
previous-workspace count Function
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.

remove-workspace &optional index Function
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.

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

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

set-number-of-workspaces wanted Function
Add or remove workspaces until the number of "interesting" workspaces is equal to wanted.

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

lock-first-workspace Variable
When true, preserve the outermost empty workspaces in the pager. Don't quietly remove them when they become empty. Defaults to true.