WM(1) WM(1) NAME wm - window manager SYNOPSIS wm/wm [ command [ arg... ] ] DESCRIPTION Wm is an inferno window manager, providing the control mech- anism for the user to manage to order and position of a dynamic collection of application windows. When started, it runs command, (by default wm/toolbar, see toolbar(1)) By itself, wm does not provide any means for starting new applications; that facility must be provided by an auxil- liary program, wm/toolbar being one such example. Control Interface Wm provides a control interface to programs running inside it through the Wmcontext adt that can be obtained from the Draw->Context that it passes to applications that it starts (see draw-context(2)). Control messages it understands include: start what Start input on what. What can be ptr (pointer events), kbd (keyboard events) and control (window manager con- trol events, see below). key charval Simulate a key event. Charval is the decimal value of the character that has been pressed. The character will be sent exactly as if it had been typed on the key- board. This facility is used by keyboard(1). !reshape tag reqid minx miny maxx Reshape or create the window named tag. Reqid is ignored; minx..maxy give the desired bounding rectangle of the new window. If how is not given, or is exact, then wm will attempt to satisfy the request exactly. Otherwise, how tells wm how to determine the rectangle of the resulting image; it can be one of place (choose some appropriate position and size on screen), onscreen (modify the requested rectangle only so as to bring it on screen), or max (request the maximum available rect- angle). delete tag Delete the window named by tag. raise Raise all windows for the current context above the Page 1 Plan 9 (printed 12/25/24) WM(1) WM(1) others. lower Send all windows for the current context to the bottom. !move tag reqid startx starty Drag window tag interactively. Reqid is ignored. Startx and starty give the location of the pointer when the drag was initiated. !size tag reqid Interactively resize window tag. fixedorigin By default, if a window changes position but not size, wm changes the origin of the window without creating a new image. Sending fixedorigin caused wm always to create a new image in that case. kbdfocus [in] If the decimal integer in is non-zero, request the key- board focus, otherwise lose the keyboard focus. Wm generates control messages to inform applications of things that have happened. These include: rect minx miny maxx maxy The screen rectangle has changed. minx..maxy gives the new bounding box of the screen. haskbdfocus in Informs an application of its current keyboard focus state. This message is generated in response to pointer events, and due to kbdfocus requests. exit The window manager is closing down. Controlling Application The first application that starts under wm is given the privilege of being able to control other applications run- ning under the same wm. If it sends a start control message, then it will also see any control requests sent by applica- tions that wm itself does not understand and information about applications starting and leaving. Wm accepts several other control messages from its controlling application: ctl id msg Send message msg to application id. endcontrol Relinquish controller status. The next application that starts will get control status. This is used, for Page 2 Plan 9 (printed 12/25/24) WM(1) WM(1) instance, to segue smoothly between logon(1) and toolbar(1). If the controlling application has started control messages, wm sends it the following messages: newclient id A new client has connected, identified by id. delclient id Client id has left. request id msg Client id sent the request msg to the window manager, which it did not understand. This facility is used, for instance, by toolbar(1) to implement the task and untask requests. FILES /chan/wmrect File holding current screen rectangle. SOURCE /appl/wm/wm.b SEE ALSO toolbar(1), logon(1), tkclient(2), wmclient(2) Page 3 Plan 9 (printed 12/25/24)