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
97             selected, 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
115             after 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
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
143     vtile percent
144             Set the percentage of screen the master window should occupy
145             after calling window-vtile.  If set to 0, the vertical size of
146             the 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-close-[n]          Close all windows in group n, where n is 1-9.
168     group-toggle-all         Toggle visibility of all groups.
169     window-group             Toggle group membership of current window.
170     window-movetogroup-[n]   Hide current window from display and move to
171                              group n, where n is 1-9.
172     group-cycle              Forward cycle through groups.
173     group-rcycle             Reverse cycle through groups.
174     window-cycle             Forward cycle through windows.
175     window-rcycle            Reverse cycle through windows.
176     window-cycle-ingroup     Forward cycle through windows in current group.
177     window-rcycle-ingroup    Reverse cycle through windows in current group.
178     window-close             Close current window.
179     window-hide              Hide current window.
180     window-lower             Lower current window.
181     window-raise             Raise current window.
182     window-menu-label        Label current window.
183     window-freeze            Freeze current window geometry.
184     window-stick             Stick current window to all groups (same as
185                              assigning to nogroup).
186     window-fullscreen        Full-screen current window (gap + border
187                              removed).
188     window-maximize          Maximize current window (gap + border honored).
189     window-vmaximize         Vertically maximize current window (gap + border
190                              honored).
191     window-hmaximize         Horizontally maximize current window (gap + bor‐
192                              der honored).
193     window-htile             Current window is placed at the top of the
194                              screen, maximized horizontally and resized to
195                              htile (default half) of the vertical screen
196                              space.  Other windows in its group share remain‐
197                              ing screen space.
198     window-vtile             Current window is placed on the left of the
199                              screen, maximized vertically and resized to
200                              vtile (default half) of the horizontal screen
201                              space.  Other windows in its group share remain‐
202                              ing screen space.
203     window-move              Move current window.
204     window-resize            Resize current window.
205     window-move-up           Move window moveamount pixels up.
206     window-move-down         Move window moveamount pixels down.
207     window-move-right        Move window moveamount pixels right.
208     window-move-left         Move window moveamount pixels left.
209     window-move-up-big       Move window 10 times moveamount pixels up.
210     window-move-down-big     Move window 10 times moveamount pixels down.
211     window-move-right-big    Move window 10 times moveamount pixels right.
212     window-move-left-big     Move window 10 times moveamount pixels left.
213     window-resize-up         Resize window moveamount pixels up.
214     window-resize-down       Resize window moveamount pixels down.
215     window-resize-right      Resize window moveamount pixels right.
216     window-resize-left       Resize window moveamount pixels left.
217     window-resize-up-big     Resize window 10 times moveamount pixels up.
218     window-resize-down-big   Resize window 10 times moveamount pixels down.
219     window-resize-right-big  Resize window 10 times moveamount pixels right.
220     window-resize-left-big   Resize window 10 times moveamount pixels left.
221     window-snap-up           Snap window to top edge.
222     window-snap-down         Snap window to bottom edge.
223     window-snap-right        Snap window to right edge.
224     window-snap-left         Snap window to left edge.
225     window-snap-up-right     Snap window to top-right corner.
226     window-snap-up-left      Snap window to top-left corner.
227     window-snap-down-right   Snap window to bottom-right corner.
228     window-snap-down-left    Snap window to bottom-left corner.
229     pointer-move-up          Move pointer moveamount pixels up.
230     pointer-move-down        Move pointer moveamount pixels down.
231     pointer-move-right       Move pointer moveamount pixels right.
232     pointer-move-left        Move pointer moveamount pixels left.
233     pointer-move-up-big      Move pointer 10 times moveamount pixels up.
234     pointer-move-down-big    Move pointer 10 times moveamount pixels down.
235     pointer-move-right-big   Move pointer 10 times moveamount pixels right.
236     pointer-move-left-big    Move pointer 10 times moveamount pixels left.
237

FILES

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

EXAMPLES

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

SEE ALSO

283     cwm(1)
284

HISTORY

286     The cwmrc file format first appeared in OpenBSD 4.4.
287
288BSD                             April 11, 2021                             BSD
Impressum