cwmrc man page
cwmrc — calm window manager configuration file
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:
Automatically add new windows to group if their class property matches windowclass, or if their name and class properties match windowname and windowclass, respectively. The more specific last match wins. group is a number between 0 and 9. If group is 0, matching windows will not be added to any group; this may be used to override “sticky group mode”.
The name and class values, respectively, for existing windows are both set in the WM_CLASS property and may be obtained using xprop(1).
Bind or rebind key key to function. The modifier keys come first, followed by a ‘-’, then a keysym name, taken from
The following modifiers are recognised:
Mod4 (windows) key.
The function may either be one from the Bind Function List (see below) or the command line that is to be executed.
Bind or rebind button button to function. The modifier keys come first, followed by a ‘-’, then the button number.
The following modifiers are recognised:
Mod4 (windows) key.
The following buttons are recognised:
Left mouse button.
Middle mouse button.
Right mouse button.
Scroll up mouse button.
Scroll down mouse button.
The function may be taken from the Bind Function List (see below) or the command line that is to be executed.
Set the window border width to pixels.
Set the color of the active border.
Set menu font color.
Set font color for selected menu item.
Set the color of the border while grouping a window.
Set the color of the inactive border.
Set menu background color.
Set menu foreground color.
Set the color of the border of a window indicating urgency.
Set the color of the border while ungrouping a window.
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 key bindings. The defaults are xterm(1) and xlock(1), respectively.
Change the default font for Xft(3).
gaptop 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, and do not warp to, windows with the name windowname when drawing borders and cycling through windows.
Set a default size for the keyboard movement bindings, in pixels. The default is 1.
Minimum distance to snap-to adjacent edge, in pixels. The default is 0.
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.
Unbind function bound to key. A special key keyword “all” can be used to unbind all keys.
Unbind function bound to button. A special button keyword “all” can be used to unbind all buttons.
Every name entry is shown in the wm menu. When selected, the window manager is replaced by path.
Bind Function List
Restart the running cwm(1).
Spawn a new terminal.
Lock the screen.
Launch window search menu.
Launch hidden window search menu.
Launch application search menu.
Launch group search menu.
Launch “exec program” menu.
Launch “exec WindowManager” menu.
Launch “ssh” menu.
Toggle visibility of group n, where n is 1-9.
Show only group n, where n is 1-9, hiding other groups.
Toggle visibility of all groups.
Toggle group membership of current window.
Hide current window from display and move to group n, where n is 1-9.
Forward cycle through groups.
Reverse cycle through groups.
Forward cycle through windows.
Reverse cycle through windows.
Forward cycle through windows in current group.
Reverse cycle through windows in current group.
Delete current window.
Hide current window.
Lower current window.
Raise current window.
Label current window.
Freeze current window geometry.
Stick current window to all groups (same as assigning to nogroup).
Full-screen current window (gap + border removed).
Maximize current window (gap + border honored).
Vertically maximize current window (gap + border honored).
Horizontally maximize current window (gap + border honored).
Current window is placed at the top of the screen, maximized horizontally and resized to half of the vertical screen space. Other windows in its group share remaining screen space.
Current window is placed on the left of the screen, maximized vertically and resized to half of the horizontal screen space. Other windows in its group share remaining screen space.
Move current window.
Resize current window.
Move window moveamount pixels up.
Move window moveamount pixels down.
Move window moveamount pixels right.
Move window moveamount pixels left.
Move window 10 times moveamount pixels up.
Move window 10 times moveamount pixels down.
Move window 10 times moveamount pixels right.
Move window 10 times moveamount pixels left.
Resize window moveamount pixels up.
Resize window moveamount pixels down.
Resize window moveamount pixels right.
Resize window moveamount pixels left.
Resize window 10 times moveamount pixels up.
Resize window 10 times moveamount pixels down.
Resize window 10 times moveamount pixels right.
Resize window 10 times moveamount pixels left.
Snap window to top edge.
Snap window to bottom edge.
Snap window to right edge.
Snap window to left edge.
Snap window to top-right corner.
Snap window to top-left corner.
Snap window to bottom-right corner.
Snap window to bottom-left corner.
Move pointer moveamount pixels up.
Move pointer moveamount pixels down.
Move pointer moveamount pixels right.
Move pointer moveamount pixels left.
Move pointer 10 times moveamount pixels up.
Move pointer 10 times moveamount pixels down.
Move pointer 10 times moveamount pixels right.
Move pointer 10 times moveamount pixels left.
Default cwm(1) configuration file.
# 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 # Key bindings bind-key CM-r window-menu-label bind-key CS-Return "xterm -e top" bind-key C4-equal window-vmaximize bind-key C4S-equal window-hmaximize bind-key M-1 group-only-1 bind-key M-2 group-only-2 bind-key M-3 group-only-3 bind-key MS-1 window-movetogroup-1 bind-key MS-2 window-movetogroup-2 bind-key MS-3 window-movetogroup-3 unbind-key 4-o unbind-key CM-equal unbind-key CMS-equal # Mouse bindings bind-mouse M-2 window-lower bind-mouse M-3 window-resize
The cwmrc file format first appeared in OpenBSD 4.4.