Next: Popup Menus, Previous: Multi-Head Environments, Up: Top
Sawfish supports multiple ways of placing new windows on the display. There is a “current” placement mode for normal windows, and another mode for transient windows.
A symbol indicating the method of placing normal windows. This defaults to
top-left.
A symbol indicating the method of placing transient windows. This defaults to
centered-on-parent.
List of names of all placement modes. Sawfish 1.3 ships with the following placement modes:
randomlyThe new window is placed at a random location on the screen.interactivelyPrompt the user to select a position with the mouse. The new window is created such that its top-left corner is at that position.centeredThe new window is created at the center of the screen.centered-on-parentThe new window has a parent, it is centered on that parent. If the new window instead has a focused window in the same group, it is centered on that focused window. Otherwise the new window is simplycentered.under-pointerCreate the new window so that it's under the pointer, without going off the edge of the screen.first-fitbest-fitLook for positions where the new window would have a small overlap area with already visible windows. Thefirst-fitalgorithm uses the first “good” position found. Thebest-fitalgorithm looks at all possible positions and picks the best of them.best-fit-groupAsbest-fit, but the new window is only checked for overlap with other windows in its group.first-fit-or-interactiveAsfirst-fit, but if Sawfish cannot find a “good” position, it falls back tointeractivelymode.staggerAttempts to place each new window below and to the right of the previous window. Seestagger-placement-step.top-leftInterpret the top-left to bottom-right screen diagonal as a series of slots, each of which may have a window. Find the first empty slot and place the window there. Sawfish will shrink the window to prevent it from going past the right or bottom edge, or even beneath a special window like a panel. If Sawfish is not allowed to shrink the window enough to prevent this, it instead places the window randomly.off-centerTries to put windows in the center of the screen, but in such a way that the newly placed window doesn't fully obscure an existing window.This is to handle the case where two windows of the same size are created one after the other, so that the user is sure to see (at least part of) both windows.
Make no changes to the window's position. The window remains wherever the X server placed it initially.
In all of these placement modes, the mode is responsible for taking
the window object as an argument, and manipulating its position with,
e.g., move-window-to.
In
staggerplacement mode, the distance down and to the right from the previously placed window to the new one. This is measured in pixels.
There are two circumstances in which Sawfish will place a window:
either the window has just been created, or Sawfish has begun managing
the window's display. In the latter case, the window will have the
placed property.
When
t, program position size hints are not considered when placing windows.
“Avoided” windows should be kept unobscured by other windows wherever possible. In particular, first-fit and best-fit methods will attempt to place new windows away from them, and maximized windows will not stretch over them.
Return t if window should be kept unobscured by other windows wherever possible.
Returns a list of all windows that should be left unobscured where possible. If window is defined, then it defines a window that will be never returned in the list.
When non-nil, ignored windows aren't avoided by default. Defaults to non-nil.
When non-nil, any unspecified windows are avoided by default. Defaults to nil.
You can define your own placement modes.
Define a new window placement mode called name (a symbol). The function fun will be called with a single argument when a window should be placed using this mode. The single argument is the window to be placed.
If the for-normal keyword is
t, then this placement mode is marked as valid forplace-window-mode. The same applies to for-dialogs andplace-transient-mode.
Define placement mode name (a symbol) to be loaded from structure structure-name (a symbol) when first referenced. The keyword-args are passed along to the call to
define-placement-modethat creates the placement mode.