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


12.3 Workspaces and Windows

Workspaces do not need to have windows assigned to them, but most operations with workspaces involve adding and removing windows.

Function: all-workspaces

Returns a list of indices for all workspaces that contain windows. Sticky windows appear in the current workspace.

Function: workspace-empty-p space

Returns true if workspace space contains zero (non-sticky) windows.

Function: delete-empty-workspaces

Delete any workspaces that don’t contain any windows.

Variable: workspace-boundary-mode

How to act when passing the first or last workspace, one of stop, wrap-around or keep-going. Defaults to stop.

Each window can be a member of any (positive) number of workspaces; their workspaces property contains a list of workspace ids. Sticky windows appear on all workspaces, and have their sticky property set (with a null workspaces property). If Sawfish begins managing a window with its workspaces property set, then the window is added to those workspaces automatically.

Function: window-in-workspace-p window space

Returns true if window is a member of workspace space, false otherwise.

Function: window-appears-in-workspace-p window space

Returns true if window appears in workspace space, false otherwise. To appear, window has to be visible, but it can either be assigned to the workspace or be sticky.

Function: windows-share-workspace-p window1 window2

Returns true if window1 and window2 are members of at least one common workspace.

Function: nearest-workspace-with-window window space

Returns the nearest workspace to space that contains window.

Function: workspace-windows #!optional space include-iconified

Returns a list of all windows that are members of the current workspace (or space if it is not nil). The list normally does not contain iconified windows, but they can by included by specifying a true include-iconified argument.

Function: popup-window-menu

Display the menu of all managed windows.

Function: move-window-to-workspace window old new #!optional was-focused

Move window from workspace old to workspace new.

We need the old workspace as an explicit argument because a window can be in more than one workspace. The function does the right thing if the window already appears in workspace new.

If was-focused is true and the window is visible, it gets the input focus in the new workspace.

Function: copy-window-to-workspace window old new #!optional was-focused

Arrange it so window appears in both old and new workspaces.

If was-focused is true and the window is visible, it gets the input focus in the new workspace.

Function: send-to-next-workspace window count #!optional copy select

Move the window count workspaces to the right. Count does not default to one.

The window is normally removed from the current workspace (if it is in that workspace), or from the first workspace it belongs to. Supplying a true copy argument causes Sawfish to copy the window instead.

If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.

Function: send-to-previous-workspace window count #!optional copy select

Move the window count workspaces to the left. Count does not default to one.

The window is normally removed from the current workspace (if it is in that workspace), or from the first workspace it belongs to. Supplying a true copy argument causes Sawfish to copy the window instead.

If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.

This is identical to (send-to-next-workspace window count copy select).

Function: copy-to-next-workspace window count select

Copy the window count workspaces to the left. Count does not default to one.

If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.

This is identical to (send-to-next-workspace window count t select).

Function: copy-to-previous-workspace window count #!optional select

Copy the window count workspaces to the right. Count does not default to one.

If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.

This is identical to (send-to-previous-workspace window count t select).

Function: send-window-to-workspace-from-first window count #!optional copy select

Move window to the workspace at position count in the “interesting” list.

The window is normally removed from the current workspace (if it is in that workspace), or from the first workspace it belongs to. Supplying a true copy argument causes Sawfish to copy the window instead.

If select is true, then we switch to the destination workspace. If the moved window had input focus before the move, it will have input focus after the move as well.

Variable: workspace-send-boundary-mode

How to act when passing the first or last workspace, while moving a window. One of stop, keep-going, wrap-around. Defaults to stop.

Function: delete-window-instance window

Remove the copy of window on the current workspace. If this is the last instance remaining, then delete the actual window. Note that this behavior differs from the merging that happens when you delete a workspace.

Function: map-window-workspaces fun window

Map function fun over all workspaces containing window.

When a window appears on more than one workspace, some of its properties may be swapped in and out on demand when the current workspace is changed.

Variable: workspace-local-properties

Window properties whose values may differ on differnet workspaces. Defaults to the empty list.

Variable: add-swapped-properties props

Add all properties in the list props to workspace-local-properties.

It is possible to hide all “normal” windows across workspaces. “Normal” in this case excludes desktop windows and dock windows, but includes sticky and ignored windows. The hidden windows are no longer considered “viewable” according to window-viewable-p.

Function: show-desktop

Hide all windows except the desktop and dock windows.

Function: hide-desktop

Undo the effects of the show-desktop command.

Function: showing-desktop-p

Return true if non-desktop and non-dock windows are hidden, false otherwise.


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