CWMRC(5)                  OpenBSD Programmer's Manual                 CWMRC(5)

NAME
     cwmrc - calm window manager configuration file

DESCRIPTION
     This manual page describes the cwm(1) configuration file.  The following
     options are accepted in the configuration file:

     autogroup group ``windowclass''
     autogroup group ``windowclass,windowname''
             Control automatic window grouping, based on the class and/or name
             properties, where group is a number between 0 and 9.  If the
             group number is 0, then the window will not be grouped; this to
             allow for ``sticky'' windows in sticky group mode.

             The class and name of a window may be obtained using xprop(1).

     bind keys command
             Cause the creation of a keybinding, or replacement of a default
             keybinding.  The modifier keys come first, followed by a `-'.

             The following modifiers are recognised:

                   C       The Control key.
                   M       The Meta key.
                   S       The Shift key.
                   4       The Mod4 key (normally the windows key).

             The `-' should be followed by either a keysym name, taken from
             /usr/X11R6/include/X11/keysymdef.h, or a numerical keycode value
             enclosed in ``[]''.  The command may either be one from the BIND
             COMMAND LIST (see below) or the command line that is to be exe-
             cuted.

             A special command keyword ``unmap'' can be used to remove the
             named keybinding.  This can be used to remove a binding which
             conflicts with an application.

     command name path
             Every name entry is shown in the application menu.  When select-
             ed, the defined path is executed with execve(2).

             The name entries term and lock have a special meaning.  They
             point to the terminal and screen locking programs specified by
             keybindings.  The defaults are xterm(1) and xlock(1), respective-
             ly.

     fontname font
             Change the default font for Xft(3).

     gap top bottom left right
             Define a ``gap'' in pixels at the edge of the screen, so that
             when a window is maximized it will not overlap this area.  This
             ``gap'' can be used for applications such as xclock(1), where the
             user may wish to remain visible.

     ignore windowname
             Ignore drawing borders around a window with the name windowname.

     mousebind buttons command
             Cause the creation of a mouse binding, or replacement of a de-
             fault mouse binding.  The modifier keys come first, followed by a
             `-'.  The following modifiers are recognised:

                   C       The Control key.
                   M       The Meta key.
                   S       The Shift key.
                   4       The Mod4 key (normally the windows key).

             The `-' should be followed by number:

                   1       Left mouse button.
                   2       Right mouse button.
                   3       Middle mouse button.

             The command may be taken from the MOUSEBIND COMMAND LIST (see be-
             low).

     sticky yes|no
             Toggle sticky group mode.  The default behavior for new windows
             is to not assign any group.  By enabling sticky group mode,
             cwm(1) will assign new windows to the currently selected group.

EXAMPLE CONFIGURATION
     # Set default Xft(3) font
     fontname "sans-serif:pixelsize=14:bold"

     # Turn on sticky-group mode
     sticky yes

     # Any entry here is shown in the application menu
     command firefox         firefox
     command xmms            xmms
     command top             "xterm -e top"

     # Autogroup definitions
     autogroup 3 "aterm,XTerm"
     autogroup 3 "xterm,XTerm"

     # Ignore programs by that name by not drawing borders around them.
     ignore XMMS
     ignore xwi
     ignore xapm
     ignore xclock

     # Keybindings
     bind CM-r       label
     bind CS-Return  "xterm -e top"
     bind 4-o        unmap

     # Mousebindings
     mousebind M-2   window_lower
     mousebind M-3   window_resize

BIND COMMAND LIST
     reload              Reload configuration.
     quit                Quit cwm(1).
     terminal            Spawn a new terminal.
     lock                Lock the screen.
     search              Launch window search menu.
     menusearch          Launch application search menu.
     exec                Launch ``exec program'' menu.
     exec_wm             Launch ``exec WindowManager'' menu.
     ssh                 Launch ``ssh'' menu.
     group[n]            Select group n, where n is 1-9.
     nogroup             Select all groups.
     grouptoggle         Toggle group membership of current window.
     cyclegroup          Forward cycle through groups.
     rcyclegroup         Reverse cycle through groups.
     cycle               Forward cycle through windows.
     rcycle              Reverse cycle through windows.
     delete              Delete current window.
     hide                Hide current window.
     lower               Lower current window.
     raise               Raise current window.
     label               Label current window.
     maximize            Maximize current window full-screen.
     vmaximize           Maximize current window vertically.
     moveup              Move window 1 pixel up.
     movedown            Move window 1 pixel down.
     moveright           Move window 1 pixel right.
     moveleft            Move window 1 pixel left.
     bigmoveup           Move window 10 pixels up.
     bigmovedown         Move window 10 pixels down.
     bigmoveright        Move window 10 pixels right.
     bigmoveleft         Move window 10 pixels left.
     resizeup            Resize window 1 pixel up.
     resizedown          Resize window 1 pixel down.
     resizeright         Resize window 1 pixel right.
     resizeleft          Resize window 1 pixel left.
     bigresizeup         Resize window 10 pixels up.
     bigresizedown       Resize window 10 pixels down.
     bigresizeright      Resize window 10 pixels right.
     bigresizeleft       Resize window 10 pixels left.
     ptrmoveup           Move pointer 1 pixel up.
     ptrmovedown         Move pointer 1 pixel down.
     ptrmoveright        Move pointer 1 pixel right.
     ptrmoveleft         Move pointer 1 pixel left.
     bigptrmoveup        Move pointer 10 pixels up.
     bigptrmovedown      Move pointer 10 pixels down.
     bigptrmoveright     Move pointer 10 pixels right.
     bigptrmoveleft      Move pointer 10 pixels left.

MOUSEBIND COMMAND LIST
     window_move         Move current window.
     window_resize       Resize current window.
     window_lower        Lower current window.
     window_hide         Hide current window.
     window_grouptoggle  Toggle group membership of current window.
     menu_group          Launch group list.
     menu_unhide         Launch group list.
     menu_cmd            Launch command list.

FILES
     ~/.cwmrc     default cwm(1) configuration file

SEE ALSO
     cwm(1)

HISTORY
     The cwmrc file format first appeared in OpenBSD 4.4.

OpenBSD 4.4                      July 11, 2008                               3
