Next: Showing and Hiding Windows, Previous: Window Stacking, Up: Windows [Contents][Index]
As noted above (see Window Attributes), the
window-dimensions
and window-position
functions return
the current configuration of a window.
Move the top-left corner of the window frame of window to (x, y).
Set the dimensions of the client window associated with object window to (width, height).
Move the top-left corner of the window frame of window to (x, y), and set the dimensions of the frame to (width, height).
Resize the window window respecting the hints (see below). For the first function, the dimensions are cols columns and rows rows. For the second function, the dimensions are width pixels and height pixels.
The hints parameters is either the size hints alist to use, or
nil
in which case the window-size-hints
function is used
to retrieve the window’s hints.
Hints can specify minimum or maximum value of each dimension, and also increase step, as far as these two functions are concerned.
Return an alist defining the size-hints structure specified by the
client window associated with window. Possible keys in the alist
are min-height
, max-height
, min-width
,
max-width
, height-inc
, width-inc
,
min-aspect
, max-aspect
, base-height
,
base-width
, user-position
, program-position
,
user-size
, program-size
, window-gravity
,
border-size
.
Usually, however, it is left to the user to configure windows. The following functions may be called interactively: their sole argument is then either the window that received the current event or the currently focused window.
Sawfish honors the min-aspect
and max-aspect
window
hints when interactively resizing a window.
Move window interactively using the mouse. Releasing any mouse button places the window at its current position.
Resize window interactively using the mouse. Releasing any mouse button places the window at its current position.
Note that this function selects the edge or edges of the window to move from the current position of the mouse when the resizing begins. The window is divided into a three-by-three grid; the rectangle containing the mouse pointer gives the direction to resize in. If the pointer is in the central rectangle the bottom and right edges are moved.
For these commands, first you specify a window dimension(s) in the configurator. The focused window will be resized to that preset size on invocation.
You’re prompted to enter the new window size, and the window will be resized.
Wait for the user to select a window using the mouse, then interactively move that window.
Wait for the user to select a window with the mouse, then interactively resize that window.
Double / halve the size of window in both direction, i.e. the area will be 4 or 1/4 times.
Sawfish supports increasing the windows size until it touches another window. This is called “grow”. “Shrink” achieves the opposite, i.e. it decreases the windows size, until it does no longer overlap any other window. More precisely, the grow can be done repeatedly, each time until the edge meets another edge, and shrink is done so that it overlaps with one less window.
Grows window upwards / downwards / left / right until it touches another window. If that edge is beyond the screen edge, it is brought back in. With a universal prefix arg, maximize in that direction instead. With a numeric prefix arg, grow by that many increments specified by window or pixels instead.
There are commands, too, with the same name.
Shrinks window by moving one edge upwards / downwards / left /
right until it intersects with one window less than before. (So,
in shrink-window-up
for example, the lower edge is moved.)
Window won’t be made smaller than the minimum size, or
shrink-window-minimum-size
. More precisely, size truncation
may make the window smaller than these values.
There are commands, too, with the same name.
Moving counterparts, instead of resizing of “grow” and “shrink”, are “pack” and “yank”. So, “pack” moves until the window touches another, and “yank” moves until the overlap reduces.
Moves window upwards / downwards / left /right until it touches another window. If that edge is beyond the screen edge, it is moved back in. With a universal prefix arg, move in that direction maximally instead. With a numeric prefix arg, move by that many pixels instead.
There are commands, too, with the same name.
Yanks window upwards / downwards / left / right until it overlaps with one less window than before.
There are commands, too, with the same name.
Grow, pack, shrink and yank behavior can be customized through the following variables:
Whether growing is considered to be maximization.
The default value is t
.
Whether and how to move the pointer, either always
maybe
or never
. The default value is maybe
maybe
means that the pointer is moved along with the window, if
the pointer was within the window area before packing. always
warps the pointer to the center of the window if it isn’t already in
the window, then does like maybe
. never
means not to
warp the pointer.
Whether to bump into fully obscured windows.
The default value is nil
.
Whether to bump into windows on a different depth, either always
maybe
or never
. The default value is always
.
maybe
means only avoided
windows (see Avoided Windows).
Whether to bump into ignored windows.
The default value is t
.
The minimum height or width to which a window may be shrunk.
The default value is 10
.
The minimum amount of window left visible, if yanked over the screen
edge. The default value is 10
.
Place window in the middle of the screen (frame-size is respected while calculating position)
The interactive move and resize behavior can be customized through the following variables:
A symbol defining the visual method of interactively moving windows.
Current options include box
for a wire-frame grid, and
opaque
for full redisplay.
A symbol defining the visual method of interactively resizing windows.
Current options include box
for a wire-frame grid, and
opaque
for full redisplay.
When non-nil, the current window position is shown in the center of the screen.
When non-nil, the window size is shown in the center of the screen.
When you move a window and it comes close to another, sawfish adjusts its position so that its edge fits to the other, or “snaps”. (It may be dubbed as “interactive tiling”.) Snapping also takes place against screen boundary.
The distance in pixels before snapping together two edges. The bigger the value, the more adhesive windows get.
Windows have a “gravity” property, which affect how they are placed in particular positions.
Returns the gravity of window. The order of precedence is Sawfish
gravity
window property, explicit hints argument, X
window size hints. The default gravity when nothing else is specified
is north-west
(specified by ICCCM).
Next: Showing and Hiding Windows, Previous: Window Stacking, Up: Windows [Contents][Index]