Version 8 of wm geometry

Updated 2010-10-24 21:30:17 by dkf
wm geometry window ?newGeometry?

If newGeometry is specified, then the geometry of window is changed and an empty string is returned.

Otherwise the current geometry for window is returned (this is the most recent geometry specified either by manual resizing or in a wm geometry command).

NewGeometry has the form =widthxheight+x+y, where any of =, widthxheight, or +x+y'' may be omitted.

Width and height are positive integers specifying the desired dimensions of window. If window is gridded (see GRIDDED GEOMETRY MANAGEMENT ) then the dimensions are specified in grid units; otherwise they are specified in pixel units.

The x and y values specify the desired location of window on the screen, in pixels. If x is preceded by +, it specifies the number of pixels between the left edge of the screen and the left edge of window 's border; if preceded by - then x specifies the number of pixels between the right edge of the screen and the right edge of window 's border. If y is preceded by + then it specifies the number of pixels between the top of the screen and the top of window 's border; if y is preceded by - then it specifies the number of pixels between the bottom of window 's border and the bottom of the screen.

If newGeometry is specified as an empty string, then any existing user-specified geometry for window is cancelled, and the window will revert to the size requested internally by its widgets.

LV 2008 Mar 26

Note that, at least with the X Window system, an application can only suggest/request a change in window size or location - the window manager implements policy, and can decide where to actually put the window, how big it can be, etc.