OpenBSD manual page server

Manual Page Search Parameters

CWMRC(5) File Formats Manual CWMRC(5)

cwmrccalm 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:

group windowclass
 
group windowname,windowclass
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).

key function
Bind 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.
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.

button function
Bind or rebind button button to function. The modifier keys come first, followed by a ‘-’, then the button number.

The following modifiers are recognised:

Control key.
Meta key.
Shift key.
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.

pixels
Set the window border width to pixels.

color
Set the color of the active border.

color
Set menu font color.

color
Set font color for selected menu item.

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

color
Set the color of the inactive border.

color
Set menu background color.

color
Set menu foreground color.

color
Set the color of the border of a window indicating urgency.

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

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 key bindings. The defaults are xterm(1) and xlock(1), respectively.

font
Change the default font for Xft(3).

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.

windowname
Ignore, and do not warp to, windows with the name windowname when drawing borders and cycling through windows.

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

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

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.

key
Unbind function bound to key. A special key keyword “all” can be used to unbind all keys.

button
Unbind function bound to button. A special button keyword “all” can be used to unbind all buttons.

restart
Restart the running cwm(1).
quit
Quit cwm(1).
terminal
Spawn a new terminal.
lock
Lock the screen.
menu-window
Launch window search menu.
menu-window-hidden
Launch hidden window search menu.
menu-cmd
Launch application search menu.
menu-group
Launch group search menu.
menu-exec
Launch “exec program” menu.
menu-exec-wm
Launch “exec WindowManager” menu.
menu-ssh
Launch “ssh” menu.
group-toggle-[n]
Toggle visibility of group n, where n is 1-9.
group-only-[n]
Show only group n, where n is 1-9, hiding other groups.
group-toggle-all
Toggle visibility of all groups.
window-group
Toggle group membership of current window.
window-movetogroup-[n]
Hide current window from display and move to group n, where n is 1-9.
group-cycle
Forward cycle through groups.
group-rcycle
Reverse cycle through groups.
window-cycle
Forward cycle through windows.
window-rcycle
Reverse cycle through windows.
window-cycle-ingroup
Forward cycle through windows in current group.
window-rcycle-ingroup
Reverse cycle through windows in current group.
window-delete
Delete current window.
window-hide
Hide current window.
window-lower
Lower current window.
window-raise
Raise current window.
window-menu-label
Label current window.
window-freeze
Freeze current window geometry.
window-stick
Stick current window to all groups (same as assigning to nogroup).
window-fullscreen
Full-screen current window (gap + border removed).
window-maximize
Maximize current window (gap + border honored).
window-vmaximize
Vertically maximize current window (gap + border honored).
window-hmaximize
Horizontally maximize current window (gap + border honored).
window-htile
Current window is placed at the top of the screen and maximized horizontally, other windows in its group share remaining screen space.
window-vtile
Current window is placed on the left of the screen and maximized vertically, other windows in its group share remaining screen space.
window-move
Move current window.
window-resize
Resize current window.
window-move-up
Move window moveamount pixels up.
window-move-down
Move window moveamount pixels down.
window-move-right
Move window moveamount pixels right.
window-move-left
Move window moveamount pixels left.
window-move-up-big
Move window 10 times moveamount pixels up.
window-move-down-big
Move window 10 times moveamount pixels down.
window-move-right-big
Move window 10 times moveamount pixels right.
window-move-left-big
Move window 10 times moveamount pixels left.
window-resize-up
Resize window moveamount pixels up.
window-resize-down
Resize window moveamount pixels down.
window-resize-right
Resize window moveamount pixels right.
window-resize-left
Resize window moveamount pixels left.
window-resize-up-big
Resize window 10 times moveamount pixels up.
window-resize-down-big
Resize window 10 times moveamount pixels down.
window-resize-right-big
Resize window 10 times moveamount pixels right.
window-resize-left-big
Resize window 10 times moveamount pixels left.
pointer-move-up
Move pointer moveamount pixels up.
pointer-move-down
Move pointer moveamount pixels down.
pointer-move-right
Move pointer moveamount pixels right.
pointer-move-left
Move pointer moveamount pixels left.
pointer-move-up-big
Move pointer 10 times moveamount pixels up.
pointer-move-down-big
Move pointer 10 times moveamount pixels down.
pointer-move-right-big
Move pointer 10 times moveamount pixels right.
pointer-move-left-big
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

cwm(1)

The cwmrc file format first appeared in OpenBSD 4.4.

January 15, 2017 OpenBSD-6.1