CWMRC(5)

NAME
cwmrc - calm window manager configuration file

DESCRIPTION
This manual page describes the cwm(1) configuration file.

The current line can be extended over multiple lines using a backslash (‘\’). Comments can be put anywhere in the file using a hash mark (‘#’), and extend to the end of the current line. Care should be taken when commenting out multi-line text: the comment is effective until the end of the entire block.

Arguments containing whitespace should be surrounded by double quotes (").

The following options are accepted:

autogroup group windowname
autogroup group windowname,windowclass
    Control automatic window grouping, based on the name and/or class 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 name and class 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 executed.

    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.

borderwidth pixels
    Set the window border width to pixels.

color activeborder color
    Set the color of the active border.

color font color
    Set menu font color.

color groupborder color
    Set the color of the border while grouping a window.

color inactiveborder color
    Set the color of the inactive border.

color menubg color
    Set menu background color.

color menufg color
    Set menu foreground color.

color ungroupborder color
    Set the color of the border while ungrouping a window.

command name path
    Every name entry is shown in the application menu. When selected, 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), respectively.

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, and do not warp to, windows with the name windowname when drawing borders and cycling through windows.

mousebind buttons command
    Cause the creation of a mouse binding, or replacement of a default 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   Middle mouse button.
    3   Right mouse button.

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

moveamount pixels
    Set a default size for the keyboard movement bindings, in pixels. The default is 1.

snapdist pixels
    Minimum distance to snap-to adjacent edge, in pixels. The default is 0.

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
    bind CM-equal	unmap
    bind CMS-equal	unmap
    bind C4-equal	vmaximize
    bind C4S-equal	hmaximize
    bind M-1	grouponly1
    bind M-2	grouponly2
    bind M-3	grouponly3
    bind MS-1	movetogroup1
    bind MS-2	movetogroup2
    bind MS-3	movetogroup3
    # 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.
grouponly[n]
    Like group[n] but also hides the other groups.
nogroup
    Select all groups.
grouptoggle
    Toggle group membership of current window.
movetogroup[n]
    Hide current window from display and move to group n, where n is 1-9.
cyclegroup
    Forward cycle through groups.
rcyclegroup
    Reverse cycle through groups.
cycle
    Forward cycle through windows.
rcycle
    Reverse cycle through windows.
cycleingroup
    Forward cycle through windows in current group.
rcycleingroup
    Reverse cycle through windows in current group.
delete
    Delete current window.
hide
    Hide current window.
lower
    Lower current window.
raise
    Raise current window.
label
    Label current window.
freeze
    Freeze current window geometry.
maximize
    Maximize current window full-screen.
vmaximize
    Maximize current window vertically.
hmaximize
    Maximize current window horizontally.
moveup
    Move window moveamount pixels up.
movedown
    Move window moveamount pixels down.
moveright
    Move window moveamount pixels right.
moveleft
    Move window moveamount pixels left.
bigmoveup
    Move window 10 times moveamount pixels up.
bigmovedown
    Move window 10 times moveamount pixels down.
bigmoveright
    Move window 10 times moveamount pixels right.
bigmoveleft
    Move window 10 times moveamount pixels left.
resizeup
    Resize window moveamount pixels up.
resizedown
    Resize window moveamount pixels down.
resizeright
    Resize window moveamount pixels right.
resizeleft
    Resize window moveamount pixels left.
bigresizeup
    Resize window 10 times moveamount pixels up.
bigresizedown
    Resize window 10 times moveamount pixels down.
bigresizeright
    Resize window 10 times moveamount pixels right.
bigresizeleft
    Resize window 10 times moveamount pixels left.
ptrmoveup
    Move pointer moveamount pixels up.
ptrmovedown
    Move pointer moveamount pixels down.
ptrmoveright
    Move pointer moveamount pixels right.
ptrmoveleft
    Move pointer moveamount pixels left.
bigptrmoveup
    Move pointer 10 times moveamount pixels up.
bigptrmovedown
    Move pointer 10 times moveamount pixels down.
bigptrmoveright
    Move pointer 10 times moveamount pixels right.
bigptrmoveleft
    Move pointer 10 times moveamount pixels left.

MOUSEBIND COMMAND LIST
window_move
    Move current window.
window_resize
    Resize current window.
window_lower
    Lower current window.
window_raise
    Raise current window.
window_hide
    Hide current window.
window_grouptoggle
    Toggle group membership of current window.
menu_group
    Launch group list.
menu_unhide
    Launch hidden window 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.