CWM(1)                     OpenBSD Reference Manual                     CWM(1)

NAME
     cwm - a lightweight and efficient window manager for X11

SYNOPSIS
     cwm [-c file] [-d display]

DESCRIPTION
     cwm is a window manager for X11 which contains many features that concen-
     trate on the efficiency and transparency of window management.  cwm also
     aims to maintain the simplest and most pleasant aesthetic.

     The following notation is used throughout this page:

           C       Control
           M       Meta
           S       Shift
           M1      Left mouse button
           M2      Middle mouse button
           M3      Right mouse button

     cwm is very simple in its use.  Most of the actions are initiated via
     keybindings.  The current keybindings are described below; their func-
     tionality is described in more detail later.

           C-M-Return     Spawn a new terminal.
           C-M-Delete     Lock the screen.
           M-Return       Hide current window.
           M-Down         Lower current window.
           M-Up           Raise current window.
           M-/            Search for windows.
           C-/            Search for applications.
           C-M-n          Label current window.
           M-Tab          Cycle through currently visible windows.
           M-S-Tab        Reverse cycle through currently visible windows.
           C-M-x          Delete current window.
           C-M-[n]        Select group n, where n is 1-9.
           C-M-0          Select all groups.
           C-M-g          Toggle group membership of current window.
           M-Right        Cycle through active groups.
           M-Left         Reverse cycle through active groups.
           C-M-f          Toggle full-screen size of current window.
           C-M-=          Toggle vertical maximization of current window.
           M-?            Spawn ``Exec program'' dialog.
           M-.            Spawn ``Ssh to'' dialog.  This parses
                          $HOME/.ssh/known_hosts to provide host auto-comple-
                          tion.  ssh(1) will be executed via the configured
                          terminal emulator.
           C-M-w          Spawn ``Exec WindowManager'' dialog; allows you to
                          switch from cwm to another window manager without
                          restarting the X server.
           C-M-S-r        Reload configuration.
           C-M-S-q        Quit cwm.

     The mouse bindings are also important, they are:

           M-M1    Move current window.
           C-M-M1  Toggle group membership of current window.
           M-M2    Resize current window
           M-M3    Lower current window.
           CMS-M3  Hide current window.

     The options for cwm are as follows:

     -c file
             Specify the config file to use.  Defaults to ~/.cwmrc.

     -d display
             Specify the display to use.

POINTER MOVEMENT
     The pointer can be moved with the use of the keyboard through bindings.
     C-[UP|DOWN|LEFT|RIGHT] moves the pointer a small amount, while C-
     shift-[UP|DOWN|LEFT|RIGHT] moves the pointer a larger amount.  For exam-
     ple, to move the pointer to the left by a small amount, press C-LEFT.  To
     move the pointer down by a larger amount, press C-shift-DOWN.

WINDOW MOVEMENT AND RESIZING
     cwm windows can be moved with the use of the keyboard through Vi-like
     bindings.  M-[hjkl] moves the current window a small amount, while M-
     shift-[hjkl] moves the current window a larger amount.  For example, to
     move the current window to the left a small amount, press M-h.  To move
     the current window down by a larger amount, press M-shift-j.

     Similarly, windows may be resized with the same keybindings with the ad-
     dition of the Control key.  C-M-[hjkl] resizes the window a small amount
     and C-M-shift-[hjkl] resizes by a larger increment.

SEARCH
     cwm features the ability to search for windows by their current title,
     old titles, and by their label.  The priority for the search results are:
     label, current title, old titles in reverse order, and finally window
     class name.  cwm keeps a history of the 5 previous titles of a window.

     When searching, the leftmost character of the result list may show a
     flag:

            !           The window is the currently focused window.
            &           The window is hidden.

     The following keybindings may be used to navigate the result list:

           [Down], C-s or M-j    Select the next window in the list.
           [Up], C-r or M-k      Select the previous window in the list.
           [Backspace] or C-h    Backspace.
           C-u                   Clear the input.
           [Return]              Focus the selected window.
           [Esc]                 Cancel.
           C-a                   Whenever there are no matching windows, list
                                 every window.

GROUPS
     cwm has the ability to group windows together, and use the groups to per-
     form operations on the entire group instead of just one window.  Current-
     ly, the only operation that is supported is to hide and unhide the
     grouped windows.  Together with the sticky option, this can be used to
     emulate virtual desktops.

     To edit groups, use the group selection commands to toggle membership of
     a group.  A blue border will be shown briefly on windows added to the
     current group, and a red border will be shown on those just removed.

MENUS
     Menus are recalled by clicking the mouse on the root window:

            M1          Show list of currently hidden windows.  Clicking on an
                        item will unhide that window.
            M2          Show list of currently defined groups.  Clicking on an
                        item will hide/unhide that group.
            M3          Show list of applications as defined in ~/.cwmrc.
                        Clicking on an item will spawn that application.

ENVIRONMENT
     DISPLAY     cwm starts on this display unless the -d option is given.

FILES
     ~/.cwmrc

SEE ALSO
     cwmrc(5)

AUTHORS
     cwm was developed by Marius Aamodt Eriksen <marius@monkey.org> with con-
     tributions from Andy Adamson <dros@monkey.org>, Niels Provos
     <provos@monkey.org>, and Antti Nykanen <aon@iki.fi>.  Ideas, discussion
     with many others.

HISTORY
     cwm was originally inspired by evilwm, but was rewritten from scratch due
     to limitations in the evilwm codebase.  The from-scratch rewrite borrowed
     some code from 9wm, however that code has since been removed or rewrit-
     ten.

     cwm first appeared in OpenBSD 4.2.

OpenBSD 4.4                      July 11, 2008                               3
