summary refs log tree commit diff
path: root/cwmrc.5
blob: e0b4f08b654121bc6e266a3e89b053bb4d4ff50a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
.\"	$OpenBSD$
.\"
.\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The following requests are required for all man pages.
.Dd $Mdocdate: June 25 2008 $
.Dt CWMRC 5
.Os
.Sh NAME
.Nm cwmrc
.Nd calm window manager configuration file
.Sh DESCRIPTION
This manual page describes the
.Xr cwm 1
configuration file.
The following options are accepted in the configuration file:
.Pp
.Bl -tag -width Ds -compact
.It Ic autogroup Ar group Dq windowclass
.It Ic autogroup Ar group Dq windowclass,windowname
Control automatic window grouping, based on the class and/or name
properties, where
.Ar group
is a number between 0 and 9.
If the group number is 0, then the window will not be grouped; this to
allow for 
.Dq sticky
windows in sticky group mode.
.Pp
The class and name of a window may be obtained using
.Xr xprop 1 .
.Pp
.It Ic bind Ar keys Ar command
Cause the creation of a keybinding, or replacement of a default
keybinding.
The modifier keys come first, followed by a
.Sq - .
.Pp
The following modifiers are recognised:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It C
The Control key.
.It M
The Meta key.
.It S
The Shift key.
.It 4
The Mod4 key (normally the windows key).
.El
.Pp
The
.Sq -
should be followed by either a keysym name, taken from
.Pa /usr/X11R6/include/X11/keysymdef.h ,
or a numerical keycode value enclosed in
.Dq [] .
The
.Ar command
may either be one from the
.Sx BIND COMMAND LIST
(see below) or the command line that is to be executed.
.Pp
A special
.Ar command
keyword
.Dq unmap
can be used to remove the named keybinding.
This can be used to remove a binding which conflicts with an
application.
.Pp
.It Ic command Ar name Ar path
Every
.Ar name
entry is shown in the application menu.
When selected, the defined
.Ar path
is executed with
.Xr execve 2 .
.Pp
The
.Ar name
entries
.Nm term
and
.Nm lock
have a special meaning.
They point to the terminal and screen locking programs specified by
keybindings.
The defaults are
.Xr xterm 1
and
.Xr xlock 1 ,
respectively.
.Pp
.It Ic fontname Ar font
Change the default
.Ar font
for
.Xr Xft 3 .
.Pp
.It Ic gap Ar top bottom left right
Define a
.Dq gap
in pixels at the edge of the screen, so that when a
window is maximized it will not overlap this area.
This
.Dq gap
can be used for applications such as
.Xr xclock 1 ,
where the user may wish to remain visible.
.Pp
.It Ic ignore Ar windowname
Ignore drawing borders around a window with the name
.Ar windowname .
.Pp
.It Ic mousebind Ar buttons Ar command
Cause the creation of a mouse binding, or replacement of a default
mouse binding.
The modifier keys come first, followed by a
.Sq - .
.Pb
The following modifiers are recognised:
.Pp
.Bl -tag -width Ds -offset indent -compact
.It C   
The Control key.
.It M
The Meta key.
.It S
The Shift key.
.It 4
The Mod4 key (normally the windows key).
.El
.Pp
The
.Sq -
should be followed by number:
.Pb
.Bl -tag -width Ds -offset indent -compact
.Pp
.It 1
Left mouse button.
.It 2
Right mouse button.
.It 3
Middle mouse button.
.El
.Pp
The
.Ar command
may be taken from the
.Sx MOUSEBIND COMMAND LIST
(see below).
.Pp
.It Ic sticky Ic yes Ns \&| Ns Ic no
Toggle sticky group mode.
The default behavior for new windows is to not assign any group.
By enabling sticky group mode,
.Xr cwm 1
will assign new windows to the currently selected group.
.El
.Sh EXAMPLE CONFIGURATION
.Bd -literal
# 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

# Keybindings
bind CM-r	label
bind CS-Return	"xterm -e top"
bind 4-o	unmap

# Mousebindings
mousebind M-2	window_lower
mousebind M-3	window_resize
.Ed
.Sh BIND COMMAND LIST
.Bl -tag -width 18n -compact
.It quit
quit
.Xr cwm 1
.It terminal
spawn a new terminal
.It lock
lock the screen
.It search
launch window search menu
.It menusearch
launch application search menu
.It exec
launch
.Dq exec program
menu
.It exec_wm
launch
.Dq exec WindowManager
menu
.It ssh
launch
.Dq ssh
menu
.It group[n]
select group n, where n is 1-9
.It nogroup
select all groups
.It grouptoggle
toggle group membership of a window
.It cyclegroup
forward cycle through groups
.It rcyclegroup
reverse cycle through groups
.It cycle
forward cycle through windows
.It rcycle
reverse cycle through windows
.It delete
delete a window
.It hide
hide a window
.It lower
lower a window
.It raise
raise a window
.It label
label a window
.It maximize
maximize a window full-screen
.It vmaximize
maximize a window vertically
.It moveup
move window 1 pixel up
.It movedown
move window 1 pixel down
.It moveright
move window 1 pixel right
.It moveleft
move window 1 pixel left
.It bigmoveup
move window 10 pixels up
.It bigmovedown
move window 10 pixels down
.It bigmoveright
move window 10 pixels right
.It bigmoveleft
move window 10 pixels left
.It resizeup
resize window 1 pixel up
.It resizedown
resize window 1 pixel down
.It resizeright
resize window 1 pixel right
.It resizeleft
resize window 1 pixel left
.It bigresizeup
resize window 10 pixels up
.It bigresizedown
resize window 10 pixels down
.It bigresizeright
resize window 10 pixels right
.It bigresizeleft
resize window 10 pixels left
.It ptrmoveup
move pointer 1 pixel up
.It ptrmovedown
move pointer 1 pixel down
.It ptrmoveright
move pointer 1 pixel right
.It ptrmoveleft
move pointer 1 pixel left
.It bigptrmoveup
move pointer 10 pixels up
.It bigptrmovedown
move pointer 10 pixels down
.It bigptrmoveright
move pointer 10 pixels right
.It bigptrmoveleft
move pointer 10 pixels left
.El
.Sh MOUSEBIND COMMAND LIST
.Bl -tag -width 18n -compact
.It window_move
move a window
.It window_resize
resize a window
.It window_lower
lower a window
.It window_hide
hide a window
.It window_grouptoggle
toggle group membership of a window
.It menu_group
launch group list
.It menu_unhide
launch group list
.It menu_cmd
launch command list
.El
.Sh FILES
.Bl -tag -width "~/.cwmrcXXX" -compact
.It Pa ~/.cwmrc
default
.Xr cwm 1
configuration file
.El
.Sh SEE ALSO
.Xr cwm 1
.Sh HISTORY
The
.Nm
file format first appeared in
.Ox 4.4 .