~/.cwmrc
Default cwm(1) configuration file.
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:
autogroup group [windowname,]windowclassAutomatically 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-key key functionBind or rebind key key to function. The modifier keys come first, followed by a ‘-’, then a keysym name, taken from /usr/X11R6/include/X11/keysymdef.h.
The following modifiers are recognised:
Control key.
Meta key.
Shift key.
4Mod4 (windows) key.
5Mod5 (AltGr) key.
The function may either be one from the BIND FUNCTION LIST (see below) or the command line that is to be executed.
bind-mouse button functionBind or rebind button button to function. The modifier keys come first, followed by a ‘-’, then the button number.
The same modifiers are recognised as for key in bind-key.
The following buttons are recognised:
1Left mouse button.
2Middle mouse button.
3Right mouse button.
4Scroll up mouse button.
5Scroll down mouse button.
The function may be taken from the BIND FUNCTION LIST (see below) or the command line that is to be executed.
borderwidth pixelsSet the window border width to pixels.
color activeborder colorSet the color of the active border.
color font colorSet menu font color.
color selfont colorSet font color for selected menu item.
color groupborder colorSet the color of the border while grouping a window.
color inactiveborder colorSet the color of the inactive border.
color menubg colorSet menu background color.
color menufg colorSet menu foreground color.
color urgencyborder colorSet the color of the border of a window indicating urgency.
color ungroupborder colorSet the color of the border while ungrouping a window.
command name pathEvery name entry is shown in the application menu. When selected, the defined path is executed with execvp(3).
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.
fontname fontChange the default font for Xft(3).
gap top bottom left rightDefine 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.
htile percentSet the percentage of screen the master window should occupy after calling window-htile. If set to 0, the horizontal size of the master window will remain unchanged. The default is 50.
ignore windownameIgnore, and do not warp to, windows with the name windowname when drawing borders and cycling through windows.
moveamount pixelsSet a default size for the keyboard movement bindings, in pixels. The default is 1.
snapdist pixelsMinimum distance to snap-to adjacent edge, in pixels. The default is 0.
sticky yes|noToggle 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-key keyUnbind function bound to key. A special key keyword “all” can be used to unbind all keys.
unbind-mouse buttonUnbind function bound to button. A special button keyword “all” can be used to unbind all buttons.
vtile percentSet the percentage of screen the master window should occupy after calling window-vtile. If set to 0, the vertical size of the master window will remain unchanged. The default is 50.
wm name pathEvery name entry is shown in the wm menu. When selected, the window manager is replaced by path.
Restart the running cwm(1).
Quit 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.
Show only the previously active group.
Close all windows in group n, where n is 1-9.
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.
Close 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 htile (default 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 vtile (default 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.
~/.cwmrc
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
6 releases since Debian 8 (Jessie); the text changed 4 times.