1CWMRC(5)                    BSD File Formats Manual                   CWMRC(5)
2

NAME

4     cwmrc — calm window manager configuration file
5

DESCRIPTION

7     This manual page describes the cwm(1) configuration file.
8
9     The current line can be extended over multiple lines using a backslash
10     (‘\’).  Comments can be put anywhere in the file using a hash mark (‘#’),
11     and extend to the end of the current line.  Care should be taken when
12     commenting out multi-line text: the comment is effective until the end of
13     the entire block.
14
15     Arguments containing whitespace should be surrounded by double quotes
16     (").
17
18     The following options are accepted:
19
20     autogroup group windowclass
21     autogroup group windowname,windowclass
22             Automatically add new windows to group if their class property
23             matches windowclass, or if their name and class properties match
24             windowname and windowclass, respectively.  The more specific last
25             match wins.  group is a number between 0 and 9.  If group is 0,
26             matching windows will not be added to any group; this may be used
27             to override “sticky group mode”.
28
29             The name and class values, respectively, for existing windows are
30             both set in the WM_CLASS property and may be obtained using
31             xprop(1).
32
33     bind-key key function
34             Bind or rebind key key to function.  The modifier keys come
35             first, followed by a ‘-’, then a keysym name, taken from
36             /usr/X11R6/include/X11/keysymdef.h.
37
38             The following modifiers are recognised:
39
40                   C       Control key.
41                   M       Meta key.
42                   S       Shift key.
43                   4       Mod4 (windows) key.
44
45             The function may either be one from the BIND FUNCTION LIST (see
46             below) or the command line that is to be executed.
47
48     bind-mouse button function
49             Bind or rebind button button to function.  The modifier keys come
50             first, followed by a ‘-’, then the button number.
51
52             The following modifiers are recognised:
53
54                   C       Control key.
55                   M       Meta key.
56                   S       Shift key.
57                   4       Mod4 (windows) key.
58
59             The following buttons are recognised:
60
61                   1       Left mouse button.
62                   2       Middle mouse button.
63                   3       Right mouse button.
64                   4       Scroll up mouse button.
65                   5       Scroll down mouse button.
66
67             The function may be taken from the BIND FUNCTION LIST (see below)
68             or the command line that is to be executed.
69
70     borderwidth pixels
71             Set the window border width to pixels.
72
73     color activeborder color
74             Set the color of the active border.
75
76     color font color
77             Set menu font color.
78
79     color selfont color
80             Set font color for selected menu item.
81
82     color groupborder color
83             Set the color of the border while grouping a window.
84
85     color inactiveborder color
86             Set the color of the inactive border.
87
88     color menubg color
89             Set menu background color.
90
91     color menufg color
92             Set menu foreground color.
93
94     color urgencyborder color
95             Set the color of the border of a window indicating urgency.
96
97     color ungroupborder color
98             Set the color of the border while ungrouping a window.
99
100     command name path
101             Every name entry is shown in the application menu.  When
102             selected, the defined path is executed with execve(2).
103
104             The name entries term and lock have a special meaning.  They
105             point to the terminal and screen locking programs specified by
106             key bindings.  The defaults are xterm(1) and xlock(1), respec‐
107             tively.
108
109     fontname font
110             Change the default font for Xft(3).
111
112     gap top bottom left right
113             Define a “gap” in pixels at the edge of the screen, so that when
114             a window is maximized it will not overlap this area.  This “gap”
115             can be used for applications such as xclock(1), where the user
116             may wish to remain visible.
117
118     ignore windowname
119             Ignore, and do not warp to, windows with the name windowname when
120             drawing borders and cycling through windows.
121
122     moveamount pixels
123             Set a default size for the keyboard movement bindings, in pixels.
124             The default is 1.
125
126     snapdist pixels
127             Minimum distance to snap-to adjacent edge, in pixels.  The
128             default is 0.
129
130     sticky yes|no
131             Toggle sticky group mode.  The default behavior for new windows
132             is to not assign any group.  By enabling sticky group mode,
133             cwm(1) will assign new windows to the currently selected group.
134
135     unbind-key key
136             Unbind function bound to key.  A special key keyword “all” can be
137             used to unbind all keys.
138
139     unbind-mouse button
140             Unbind function bound to button.  A special button keyword “all”
141             can be used to unbind all buttons.
142     wm name path
143             Every name entry is shown in the wm menu.  When selected, the
144             window manager is replaced by path.
145

BIND FUNCTION LIST

147     restart                  Restart the running cwm(1).
148     quit                     Quit cwm(1).
149     terminal                 Spawn a new terminal.
150     lock                     Lock the screen.
151     menu-window              Launch window search menu.
152     menu-window-hidden       Launch hidden window search menu.
153     menu-cmd                 Launch application search menu.
154     menu-group               Launch group search menu.
155     menu-exec                Launch “exec program” menu.
156     menu-exec-wm             Launch “exec WindowManager” menu.
157     menu-ssh                 Launch “ssh” menu.
158     group-toggle-[n]         Toggle visibility of group n, where n is 1-9.
159     group-only-[n]           Show only group n, where n is 1-9, hiding other
160                              groups.
161     group-toggle-all         Toggle visibility of all groups.
162     window-group             Toggle group membership of current window.
163     window-movetogroup-[n]   Hide current window from display and move to
164                              group n, where n is 1-9.
165     group-cycle              Forward cycle through groups.
166     group-rcycle             Reverse cycle through groups.
167     window-cycle             Forward cycle through windows.
168     window-rcycle            Reverse cycle through windows.
169     window-cycle-ingroup     Forward cycle through windows in current group.
170     window-rcycle-ingroup    Reverse cycle through windows in current group.
171     window-delete            Delete current window.
172     window-hide              Hide current window.
173     window-lower             Lower current window.
174     window-raise             Raise current window.
175     window-menu-label        Label current window.
176     window-freeze            Freeze current window geometry.
177     window-stick             Stick current window to all groups (same as
178                              assigning to nogroup).
179     window-fullscreen        Full-screen current window (gap + border
180                              removed).
181     window-maximize          Maximize current window (gap + border honored).
182     window-vmaximize         Vertically maximize current window (gap + border
183                              honored).
184     window-hmaximize         Horizontally maximize current window (gap + bor‐
185                              der honored).
186     window-htile             Current window is placed at the top of the
187                              screen, maximized horizontally and resized to
188                              half of the vertical screen space.  Other win‐
189                              dows in its group share remaining screen space.
190     window-vtile             Current window is placed on the left of the
191                              screen, maximized vertically and resized to half
192                              of the horizontal screen space.  Other windows
193                              in its group share remaining screen space.
194     window-move              Move current window.
195     window-resize            Resize current window.
196     window-move-up           Move window moveamount pixels up.
197     window-move-down         Move window moveamount pixels down.
198     window-move-right        Move window moveamount pixels right.
199     window-move-left         Move window moveamount pixels left.
200     window-move-up-big       Move window 10 times moveamount pixels up.
201     window-move-down-big     Move window 10 times moveamount pixels down.
202     window-move-right-big    Move window 10 times moveamount pixels right.
203     window-move-left-big     Move window 10 times moveamount pixels left.
204     window-resize-up         Resize window moveamount pixels up.
205     window-resize-down       Resize window moveamount pixels down.
206     window-resize-right      Resize window moveamount pixels right.
207     window-resize-left       Resize window moveamount pixels left.
208     window-resize-up-big     Resize window 10 times moveamount pixels up.
209     window-resize-down-big   Resize window 10 times moveamount pixels down.
210     window-resize-right-big  Resize window 10 times moveamount pixels right.
211     window-resize-left-big   Resize window 10 times moveamount pixels left.
212     window-snap-up           Snap window to top edge.
213     window-snap-down         Snap window to bottom edge.
214     window-snap-right        Snap window to right edge.
215     window-snap-left         Snap window to left edge.
216     window-snap-up-right     Snap window to top-right corner.
217     window-snap-up-left      Snap window to top-left corner.
218     window-snap-down-right   Snap window to bottom-right corner.
219     window-snap-down-left    Snap window to bottom-left corner.
220     pointer-move-up          Move pointer moveamount pixels up.
221     pointer-move-down        Move pointer moveamount pixels down.
222     pointer-move-right       Move pointer moveamount pixels right.
223     pointer-move-left        Move pointer moveamount pixels left.
224     pointer-move-up-big      Move pointer 10 times moveamount pixels up.
225     pointer-move-down-big    Move pointer 10 times moveamount pixels down.
226     pointer-move-right-big   Move pointer 10 times moveamount pixels right.
227     pointer-move-left-big    Move pointer 10 times moveamount pixels left.
228

FILES

230     ~/.cwmrc     Default cwm(1) configuration file.
231

EXAMPLES

233     # Set default Xft(3) font
234     fontname "sans-serif:pixelsize=14:bold"
235
236     # Turn on sticky-group mode
237     sticky yes
238
239     # Any entry here is shown in the application menu
240     command firefox         firefox
241     command xmms            xmms
242     command top             "xterm -e top"
243
244     # Autogroup definitions
245     autogroup 3 "aterm,XTerm"
246     autogroup 3 "xterm,XTerm"
247
248     # Ignore programs by that name by not drawing borders around them.
249     ignore XMMS
250     ignore xwi
251     ignore xapm
252     ignore xclock
253
254     # Key bindings
255     bind-key CM-r           window-menu-label
256     bind-key CS-Return      "xterm -e top"
257     bind-key C4-equal       window-vmaximize
258     bind-key C4S-equal      window-hmaximize
259     bind-key M-1            group-only-1
260     bind-key M-2            group-only-2
261     bind-key M-3            group-only-3
262     bind-key MS-1           window-movetogroup-1
263     bind-key MS-2           window-movetogroup-2
264     bind-key MS-3           window-movetogroup-3
265     unbind-key 4-o
266     unbind-key CM-equal
267     unbind-key CMS-equal
268
269     # Mouse bindings
270     bind-mouse M-2          window-lower
271     bind-mouse M-3          window-resize
272

SEE ALSO

274     cwm(1)
275

HISTORY

277     The cwmrc file format first appeared in OpenBSD 4.4.
278
279BSD                              June 20, 2019                             BSD
Impressum