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 [windowname,]windowclass
21             Automatically add new windows to group if their class property
22             matches windowclass, or if their name and class properties match
23             windowname and windowclass, respectively.  The more specific last
24             match wins.  group is a number between 0 and 9.  If group is 0,
25             matching windows will not be added to any group; this may be used
26             to override “sticky group mode”.
27
28             The name and class values, respectively, for existing windows are
29             both set in the WM_CLASS property and may be obtained using
30             xprop(1).
31
32     bind-key key function
33             Bind or rebind key key to function.  The modifier keys come
34             first, followed by a ‘-’, then a keysym name, taken from
35             /usr/X11R6/include/X11/keysymdef.h.
36
37             The following modifiers are recognised:
38
39                   C       Control key.
40                   M       Meta key.
41                   S       Shift key.
42                   4       Mod4 (windows) key.
43                   5       Mod5 (AltGr) 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 same modifiers are recognised as for key in bind-key.
53
54             The following buttons are recognised:
55
56                   1       Left mouse button.
57                   2       Middle mouse button.
58                   3       Right mouse button.
59                   4       Scroll up mouse button.
60                   5       Scroll down mouse button.
61
62             The function may be taken from the BIND FUNCTION LIST (see below)
63             or the command line that is to be executed.
64
65     borderwidth pixels
66             Set the window border width to pixels.
67
68     color activeborder color
69             Set the color of the active border.
70
71     color font color
72             Set menu font color.
73
74     color selfont color
75             Set font color for selected menu item.
76
77     color groupborder color
78             Set the color of the border while grouping a window.
79
80     color inactiveborder color
81             Set the color of the inactive border.
82
83     color menubg color
84             Set menu background color.
85
86     color menufg color
87             Set menu foreground color.
88
89     color urgencyborder color
90             Set the color of the border of a window indicating urgency.
91
92     color ungroupborder color
93             Set the color of the border while ungrouping a window.
94
95     command name path
96             Every name entry is shown in the application menu.  When se‐
97             lected, the defined path is executed with execvp(3).
98
99             The name entries term and lock have a special meaning.  They
100             point to the terminal and screen locking programs specified by
101             key bindings.  The defaults are xterm(1) and xlock(1), respec‐
102             tively.
103
104     fontname font
105             Change the default font for Xft(3).
106
107     gap top bottom left right
108             Define a “gap” in pixels at the edge of the screen, so that when
109             a window is maximized it will not overlap this area.  This “gap”
110             can be used for applications such as xclock(1), where the user
111             may wish to remain visible.
112
113     htile percent
114             Set the percentage of screen the master window should occupy af‐
115             ter calling window-htile.  If set to 0, the horizontal size of
116             the master window will remain unchanged.  The default is 50.
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 de‐
128             fault 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
143     vtile percent
144             Set the percentage of screen the master window should occupy af‐
145             ter calling window-vtile.  If set to 0, the vertical size of the
146             master window will remain unchanged.  The default is 50.
147
148     wm name path
149             Every name entry is shown in the wm menu.  When selected, the
150             window manager is replaced by path.
151

BIND FUNCTION LIST

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

FILES

240     ~/.cwmrc     Default cwm(1) configuration file.
241

EXAMPLES

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

SEE ALSO

284     cwm(1)
285

HISTORY

287     The cwmrc file format first appeared in OpenBSD 4.4.
288
289BSD                            February 5, 2023                            BSD
Impressum