💾 Archived View for gemini.rmf-dev.com › repo › Vaati › cwm › files › 70752885d984ff6a503a24b3d962f1… captured on 2023-01-29 at 04:31:32. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
0 .\" $OpenBSD$
1 .\"
2 .\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org>
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd $Mdocdate$
17 .Dt CWMRC 5
18 .Os
19 .Sh NAME
20 .Nm cwmrc
21 .Nd calm window manager configuration file
22 .Sh DESCRIPTION
23 This manual page describes the
24 .Xr cwm 1
25 configuration file.
26 .Pp
27 The current line can be extended over multiple lines using a backslash
28 .Pq Sq \e .
29 Comments can be put anywhere in the file using a hash mark
30 .Pq Sq # ,
31 and extend to the end of the current line.
32 Care should be taken when commenting out multi-line text:
33 the comment is effective until the end of the entire block.
34 .Pp
35 Arguments containing whitespace should be surrounded by double quotes
36 .Pq \&" .
37 .Pp
38 The following options are accepted:
39 .Bl -tag -width Ds
40 .It Ic autogroup Ar group Oo Ar windowname , Oc Ns Ar windowclass
41 Automatically add new windows to
42 .Ar group
43 if their class property matches
44 .Ar windowclass ,
45 or if their name and class properties match
46 .Ar windowname
47 and
48 .Ar windowclass ,
49 respectively.
50 The more specific last match wins.
51 .Ar group
52 is a number between 0 and 9.
53 If
54 .Ar group
55 is 0, matching windows will not be added to any group; this may be
56 used to override
57 .Dq sticky group mode .
58 .Pp
59 The name and class values, respectively, for existing windows
60 are both set in the WM_CLASS property and may be obtained using
61 .Xr xprop 1 .
62 .It Ic bind-key Ar key function
63 Bind or rebind key
64 .Ar key
65 to
66 .Ar function .
67 The modifier keys come first, followed by a
68 .Sq - ,
69 then a keysym name, taken from
70 .Pa /usr/X11R6/include/X11/keysymdef.h .
71 .Pp
72 The following modifiers are recognised:
73 .Pp
74 .Bl -tag -width Ds -offset indent -compact
75 .It Ic C
76 Control key.
77 .It Ic M
78 Meta key.
79 .It Ic S
80 Shift key.
81 .It Ic 4
82 Mod4 (windows) key.
83 .It Ic 5
84 Mod5 (AltGr) key.
85 .El
86 .Pp
87 The
88 .Ar function
89 may either be one from the
90 .Sx BIND FUNCTION LIST
91 (see below) or the command line that is to be executed.
92 .It Ic bind-mouse Ar button function
93 Bind or rebind button
94 .Ar button
95 to
96 .Ar function .
97 The modifier keys come first, followed by a
98 .Sq - ,
99 then the button number.
100 .Pp
101 The same modifiers are recognised as for
102 .Ar key
103 in
104 .Nm bind-key .
105 .Pp
106 The following buttons are recognised:
107 .Pp
108 .Bl -tag -width Ds -offset indent -compact
109 .It Ic 1
110 Left mouse button.
111 .It Ic 2
112 Middle mouse button.
113 .It Ic 3
114 Right mouse button.
115 .It Ic 4
116 Scroll up mouse button.
117 .It Ic 5
118 Scroll down mouse button.
119 .El
120 .Pp
121 The
122 .Ar function
123 may be taken from the
124 .Sx BIND FUNCTION LIST
125 (see below) or the command line that is to be executed.
126 .It Ic borderwidth Ar pixels
127 Set the window border width to
128 .Ar pixels .
129 .It Ic color activeborder Ar color
130 Set the color of the active border.
131 .It Ic color font Ar color
132 Set menu font color.
133 .It Ic color selfont Ar color
134 Set font color for selected menu item.
135 .It Ic color groupborder Ar color
136 Set the color of the border while grouping a window.
137 .It Ic color inactiveborder Ar color
138 Set the color of the inactive border.
139 .It Ic color menubg Ar color
140 Set menu background color.
141 .It Ic color menufg Ar color
142 Set menu foreground color.
143 .It Ic color urgencyborder Ar color
144 Set the color of the border of a window indicating urgency.
145 .It Ic color ungroupborder Ar color
146 Set the color of the border while ungrouping a window.
147 .It Ic command Ar name path
148 Every
149 .Ar name
150 entry is shown in the application menu.
151 When selected, the defined
152 .Ar path
153 is executed with
154 .Xr execvp 3 .
155 .Pp
156 The
157 .Ar name
158 entries
159 .Nm term
160 and
161 .Nm lock
162 have a special meaning.
163 They point to the terminal and screen locking programs specified by
164 key bindings.
165 The defaults are
166 .Xr xterm 1
167 and
168 .Xr xlock 1 ,
169 respectively.
170 .It Ic fontname Ar font
171 Change the default
172 .Ar font
173 for
174 .Xr Xft 3 .
175 .It Ic gap Ar top bottom left right
176 Define a
177 .Dq gap
178 in pixels at the edge of the screen, so that when a
179 window is maximized it will not overlap this area.
180 This
181 .Dq gap
182 can be used for applications such as
183 .Xr xclock 1 ,
184 where the user may wish to remain visible.
185 .It Ic htile Ar percent
186 Set the percentage of screen the master window should occupy
187 after calling
188 .Ic window-htile .
189 If set to 0, the horizontal size of the master window will
190 remain unchanged.
191 The default is 50.
192 .It Ic ignore Ar windowname
193 Ignore, and do not warp to, windows with the name
194 .Ar windowname
195 when drawing borders and cycling through windows.
196 .It Ic moveamount Ar pixels
197 Set a default size for the keyboard movement bindings,
198 in pixels.
199 The default is 1.
200 .It Ic snapdist Ar pixels
201 Minimum distance to snap-to adjacent edge, in pixels.
202 The default is 0.
203 .It Ic sticky Ic yes Ns \&| Ns Ic no
204 Toggle sticky group mode.
205 The default behavior for new windows is to not assign any group.
206 By enabling sticky group mode,
207 .Xr cwm 1
208 will assign new windows to the currently selected group.
209 .It Ic unbind-key Ar key
210 Unbind function bound to
211 .Ar key .
212 A special
213 .Ar key
214 keyword
215 .Dq all
216 can be used to unbind all keys.
217 .It Ic unbind-mouse Ar button
218 Unbind function bound to
219 .Ar button .
220 A special
221 .Ar button
222 keyword
223 .Dq all
224 can be used to unbind all buttons.
225 .It Ic vtile Ar percent
226 Set the percentage of screen the master window should occupy
227 after calling
228 .Ic window-vtile .
229 If set to 0, the vertical size of the master window will
230 remain unchanged.
231 The default is 50.
232 .It Ic wm Ar name path
233 Every
234 .Ar name
235 entry is shown in the wm menu.
236 When selected, the window manager is replaced by
237 .Ar path .
238 .El
239 .Sh BIND FUNCTION LIST
240 .Bl -tag -width 23n -compact
241 .It restart
242 Restart the running
243 .Xr cwm 1 .
244 .It quit
245 Quit
246 .Xr cwm 1 .
247 .It terminal
248 Spawn a new terminal.
249 .It lock
250 Lock the screen.
251 .It menu-window
252 Launch window search menu.
253 .It menu-window-hidden
254 Launch hidden window search menu.
255 .It menu-cmd
256 Launch application search menu.
257 .It menu-group
258 Launch group search menu.
259 .It menu-exec
260 Launch
261 .Dq exec program
262 menu.
263 .It menu-exec-wm
264 Launch
265 .Dq exec WindowManager
266 menu.
267 .It menu-ssh
268 Launch
269 .Dq ssh
270 menu.
271 .It group-toggle-[n]
272 Toggle visibility of group n, where n is 1-9.
273 .It group-only-[n]
274 Show only group n, where n is 1-9, hiding other groups.
275 .It group-last
276 Show only the previously active group.
277 .It group-close-[n]
278 Close all windows in group n, where n is 1-9.
279 .It group-toggle-all
280 Toggle visibility of all groups.
281 .It window-group
282 Toggle group membership of current window.
283 .It window-movetogroup-[n]
284 Hide current window from display and move to group n, where n is 1-9.
285 .It group-cycle
286 Forward cycle through groups.
287 .It group-rcycle
288 Reverse cycle through groups.
289 .It window-cycle
290 Forward cycle through windows.
291 .It window-rcycle
292 Reverse cycle through windows.
293 .It window-cycle-ingroup
294 Forward cycle through windows in current group.
295 .It window-rcycle-ingroup
296 Reverse cycle through windows in current group.
297 .It window-close
298 Close current window.
299 .It window-hide
300 Hide current window.
301 .It window-lower
302 Lower current window.
303 .It window-raise
304 Raise current window.
305 .It window-menu-label
306 Label current window.
307 .It window-freeze
308 Freeze current window geometry.
309 .It window-stick
310 Stick current window to all groups (same as assigning to nogroup).
311 .It window-fullscreen
312 Full-screen current window (gap + border removed).
313 .It window-maximize
314 Maximize current window (gap + border honored).
315 .It window-vmaximize
316 Vertically maximize current window (gap + border honored).
317 .It window-hmaximize
318 Horizontally maximize current window (gap + border honored).
319 .It window-htile
320 Current window is placed at the top of the screen, maximized
321 horizontally and resized to
322 .Ar htile
323 (default half) of the vertical screen space.
324 Other windows in its group share remaining screen space.
325 .It window-vtile
326 Current window is placed on the left of the screen, maximized vertically
327 and resized to
328 .Ar vtile
329 (default half) of the horizontal screen space.
330 Other windows in its group share remaining screen space.
331 .It window-move
332 Move current window.
333 .It window-resize
334 Resize current window.
335 .It window-move-up
336 Move window
337 .Ar moveamount
338 pixels up.
339 .It window-move-down
340 Move window
341 .Ar moveamount
342 pixels down.
343 .It window-move-right
344 Move window
345 .Ar moveamount
346 pixels right.
347 .It window-move-left
348 Move window
349 .Ar moveamount
350 pixels left.
351 .It window-move-up-big
352 Move window 10 times
353 .Ar moveamount
354 pixels up.
355 .It window-move-down-big
356 Move window 10 times
357 .Ar moveamount
358 pixels down.
359 .It window-move-right-big
360 Move window 10 times
361 .Ar moveamount
362 pixels right.
363 .It window-move-left-big
364 Move window 10 times
365 .Ar moveamount
366 pixels left.
367 .It window-resize-up
368 Resize window
369 .Ar moveamount
370 pixels up.
371 .It window-resize-down
372 Resize window
373 .Ar moveamount
374 pixels down.
375 .It window-resize-right
376 Resize window
377 .Ar moveamount
378 pixels right.
379 .It window-resize-left
380 Resize window
381 .Ar moveamount
382 pixels left.
383 .It window-resize-up-big
384 Resize window 10 times
385 .Ar moveamount
386 pixels up.
387 .It window-resize-down-big
388 Resize window 10 times
389 .Ar moveamount
390 pixels down.
391 .It window-resize-right-big
392 Resize window 10 times
393 .Ar moveamount
394 pixels right.
395 .It window-resize-left-big
396 Resize window 10 times
397 .Ar moveamount
398 pixels left.
399 .It window-snap-up
400 Snap window to top edge.
401 .It window-snap-down
402 Snap window to bottom edge.
403 .It window-snap-right
404 Snap window to right edge.
405 .It window-snap-left
406 Snap window to left edge.
407 .It window-snap-up-right
408 Snap window to top-right corner.
409 .It window-snap-up-left
410 Snap window to top-left corner.
411 .It window-snap-down-right
412 Snap window to bottom-right corner.
413 .It window-snap-down-left
414 Snap window to bottom-left corner.
415 .It pointer-move-up
416 Move pointer
417 .Ar moveamount
418 pixels up.
419 .It pointer-move-down
420 Move pointer
421 .Ar moveamount
422 pixels down.
423 .It pointer-move-right
424 Move pointer
425 .Ar moveamount
426 pixels right.
427 .It pointer-move-left
428 Move pointer
429 .Ar moveamount
430 pixels left.
431 .It pointer-move-up-big
432 Move pointer 10 times
433 .Ar moveamount
434 pixels up.
435 .It pointer-move-down-big
436 Move pointer 10 times
437 .Ar moveamount
438 pixels down.
439 .It pointer-move-right-big
440 Move pointer 10 times
441 .Ar moveamount
442 pixels right.
443 .It pointer-move-left-big
444 Move pointer 10 times
445 .Ar moveamount
446 pixels left.
447 .El
448 .Sh FILES
449 .Bl -tag -width "~/.cwmrcXXX" -compact
450 .It Pa ~/.cwmrc
451 Default
452 .Xr cwm 1
453 configuration file.
454 .El
455 .Sh EXAMPLES
456 .Bd -literal
457 # Set default Xft(3) font
458 fontname "sans-serif:pixelsize=14:bold"
459
460 # Turn on sticky-group mode
461 sticky yes
462
463 # Any entry here is shown in the application menu
464 command firefox firefox
465 command xmms xmms
466 command top "xterm -e top"
467
468 # Autogroup definitions
469 autogroup 3 "aterm,XTerm"
470 autogroup 3 "xterm,XTerm"
471
472 # Ignore programs by that name by not drawing borders around them.
473 ignore XMMS
474 ignore xwi
475 ignore xapm
476 ignore xclock
477
478 # Key bindings
479 bind-key CM-r window-menu-label
480 bind-key CS-Return "xterm -e top"
481 bind-key C4-equal window-vmaximize
482 bind-key C4S-equal window-hmaximize
483 bind-key M-1 group-only-1
484 bind-key M-2 group-only-2
485 bind-key M-3 group-only-3
486 bind-key MS-1 window-movetogroup-1
487 bind-key MS-2 window-movetogroup-2
488 bind-key MS-3 window-movetogroup-3
489 unbind-key 4-o
490 unbind-key CM-equal
491 unbind-key CMS-equal
492
493 # Mouse bindings
494 bind-mouse M-2 window-lower
495 bind-mouse M-3 window-resize
496 .Ed
497 .Sh SEE ALSO
498 .Xr cwm 1
499 .Sh HISTORY
500 The
501 .Nm
502 file format first appeared in
503 .Ox 4.4 .
504