add an rc.xml example for mouse focus
[mikachu/openbox.git] / doc / rc-mouse-focus.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!-- Do not edit this file, it will be overwritten on install.
4         Copy the file to $HOME/.config/openbox/ instead. -->
5
6 <openbox_config xmlns="http://openbox.org/3.4/rc">
7
8 <resistance>
9   <strength>10</strength>
10   <screen_edge_strength>20</screen_edge_strength>
11 </resistance>
12
13 <focus>
14   <focusNew>yes</focusNew>
15   <focusLast>yes</focusLast>
16   <followMouse>yes</followMouse>
17   <focusDelay>200</focusDelay>
18   <raiseOnFocus>no</raiseOnFocus>
19 </focus>
20
21 <placement>
22   <policy>Smart</policy>
23   <!-- 'Smart' or 'UnderMouse' -->
24 </placement>
25
26 <theme>
27   <name>Clearlooks</name>
28   <titleLayout>NLIMC</titleLayout>
29   <titleNumber>yes</titleNumber>
30   <!--
31       avaible characters are NDSLIMC, each can occur at most once.
32       N: window icon
33       L: window label (AKA title).
34       I: iconify
35       M: maximize
36       C: close
37       S: shade (roll up/down)
38       D: omnipresent (on all desktops).
39   -->
40   <keepBorder>yes</keepBorder>
41   <animateIconify>yes</animateIconify>
42   <font place="ActiveWindow">
43     <name>sans</name>
44     <size>8</size>
45     <!-- font size in points -->
46     <weight>bold</weight>
47     <!-- 'bold' or 'normal' -->
48     <slant>normal</slant>
49     <!-- 'italic' or 'normal' -->
50   </font>
51   <font place="InactiveWindow">
52     <name>sans</name>
53     <size>8</size>
54     <!-- font size in points -->
55     <weight>bold</weight>
56     <!-- 'bold' or 'normal' -->
57     <slant>normal</slant>
58     <!-- 'italic' or 'normal' -->
59   </font>
60   <font place="MenuHeader">
61     <name>sans</name>
62     <size>9</size>
63     <!-- font size in points -->
64     <weight>normal</weight>
65     <!-- 'bold' or 'normal' -->
66     <slant>normal</slant>
67     <!-- 'italic' or 'normal' -->
68   </font>
69   <font place="MenuItem">
70     <name>sans</name>
71     <size>9</size>
72     <!-- font size in points -->
73     <weight>normal</weight>
74     <!-- 'bold' or 'normal' -->
75     <slant>normal</slant>
76     <!-- 'italic' or 'normal' -->
77   </font>
78   <font place="OnScreenDisplay">
79     <name>sans</name>
80     <size>9</size>
81     <!-- font size in points -->
82     <weight>bold</weight>
83     <!-- 'bold' or 'normal' -->
84     <slant>normal</slant>
85     <!-- 'italic' or 'normal' -->
86   </font>
87 </theme>
88
89 <desktops>
90   <!-- this stuff is only used at startup, pagers allow you to change them
91        during a session -->
92   <number>4</number>
93   <firstdesk>1</firstdesk>
94   <names>
95     <name>desktop one</name>
96     <name>desktop two</name>
97     <name>desktop three</name>
98     <name>desktop four</name>
99   </names>
100 </desktops>
101
102 <resize>
103   <drawContents>yes</drawContents>
104   <popupShow>Nonpixel</popupShow>
105   <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
106   <popupPosition>Center</popupPosition>
107   <!-- 'Center' or 'Top' -->
108 </resize>
109
110 <dock>
111   <position>TopLeft</position>
112   <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
113   <floatingX>0</floatingX>
114   <floatingY>0</floatingY>
115   <noStrut>no</noStrut>
116   <stacking>Above</stacking>
117   <!-- 'Above', 'Normal', or 'Below' -->
118   <direction>Vertical</direction>
119   <!-- 'Vertical' or 'Horizontal' -->
120   <autoHide>no</autoHide>
121   <hideDelay>300</hideDelay>
122   <!-- in milliseconds (1000 = 1 second) -->
123   <showDelay>300</showDelay>
124   <!-- in milliseconds (1000 = 1 second) -->
125   <moveButton>Middle</moveButton>
126   <!-- 'Left', 'Middle', 'Right' -->
127 </dock>
128
129 <keyboard>
130   <chainQuitKey>C-g</chainQuitKey>
131
132   <!-- Keybindings for desktop switching -->
133   <keybind key="C-A-Left">
134     <action name="DesktopLeft"><wrap>no</wrap></action>
135   </keybind>
136   <keybind key="C-A-Right">
137     <action name="DesktopRight"><wrap>no</wrap></action>
138   </keybind>
139   <keybind key="C-A-Up">
140     <action name="DesktopUp"><wrap>no</wrap></action>
141   </keybind>
142   <keybind key="C-A-Down">
143     <action name="DesktopDown"><wrap>no</wrap></action>
144   </keybind>
145   <keybind key="S-A-Left">
146     <action name="SendToDesktopLeft"><wrap>no</wrap></action>
147   </keybind>
148   <keybind key="S-A-Right">
149     <action name="SendToDesktopRight"><wrap>no</wrap></action>
150   </keybind>
151   <keybind key="S-A-Up">
152     <action name="SendToDesktopUp"><wrap>no</wrap></action>
153   </keybind>
154   <keybind key="S-A-Down">
155     <action name="SendToDesktopDown"><wrap>no</wrap></action>
156   </keybind>
157   <keybind key="W-F1">
158     <action name="Desktop"><desktop>1</desktop></action>
159   </keybind>
160   <keybind key="W-F2">
161     <action name="Desktop"><desktop>1</desktop></action>
162   </keybind>
163   <keybind key="W-F3">
164     <action name="Desktop"><desktop>1</desktop></action>
165   </keybind>
166   <keybind key="W-F4">
167     <action name="Desktop"><desktop>1</desktop></action>
168   </keybind>
169   <keybind key="W-d">
170     <action name="ToggleShowDesktop"/>
171   </keybind>
172
173   <!-- Keybindings for windows -->
174   <keybind key="A-F4">
175     <action name="Close"/>
176   </keybind>
177   <keybind key="A-Escape">
178     <action name="Lower"/>
179   </keybind>
180   <keybind key="A-space">
181     <action name="ShowMenu"><menu>client-menu</menu></action>
182   </keybind>
183
184   <!-- Keybindings for window switching -->
185   <keybind key="A-Tab">
186     <action name="NextWindow"/>
187   </keybind>
188   <keybind key="A-S-Tab">
189     <action name="PreviousWindow"/>
190   </keybind>
191   <keybind key="C-A-Tab">
192     <action name="NextWindow">
193       <panels>yes</panels><desktop>yes</desktop>
194     </action>
195   </keybind>
196
197   <!-- Keybindings for running applications -->
198   <keybind key="W-e">
199     <action name="Execute">
200       <startupnotify>
201         <enabled>true</enabled>
202         <name>Konqueror</name>
203       </startupnotify>
204       <execute>kfmclient openProfile filemanagement</execute>
205     </action>
206   </keybind>
207 </keyboard>
208
209 <mouse>
210   <dragThreshold>3</dragThreshold>
211   <!-- number of pixels the mouse must move before a drag begins -->
212   <doubleClickTime>200</doubleClickTime>
213   <!-- in milliseconds (1000 = 1 second) -->
214
215   <context name="Frame">
216     <mousebind button="A-Left" action="Press">
217       <action name="Focus"/>
218     </mousebind>
219     <mousebind button="A-Left" action="Click">
220       <action name="Raise"/>
221     </mousebind>
222     <mousebind button="A-Left" action="Drag">
223       <action name="Move"/>
224     </mousebind>
225
226     <mousebind button="A-Right" action="Press">
227       <action name="Focus"/>
228     </mousebind>
229     <mousebind button="A-Right" action="Press">
230       <action name="Raise"/>
231     </mousebind>
232     <mousebind button="A-Right" action="Drag">
233       <action name="Resize"/>
234     </mousebind> 
235
236     <mousebind button="A-Middle" action="Press">
237       <action name="Focus"/>
238       <action name="Lower"/>
239     </mousebind>
240
241     <mousebind button="A-Up" action="Click">
242       <action name="DesktopPrevious"/>
243     </mousebind>
244     <mousebind button="A-Down" action="Click">
245       <action name="DesktopNext"/>
246     </mousebind>
247     <mousebind button="A-S-Up" action="Click">
248       <action name="SendToDesktopPrevious"/>
249     </mousebind>
250     <mousebind button="A-S-Down" action="Click">
251       <action name="SendToDesktopNext"/>
252     </mousebind>
253   </context>
254
255   <context name="Titlebar">
256     <mousebind button="Left" action="Press">
257       <action name="Focus"/>
258     </mousebind>
259     <mousebind button="Left" action="Click">
260       <action name="Raise"/>
261     </mousebind>
262     <mousebind button="Left" action="Drag">
263       <action name="Move"/>
264     </mousebind>
265     <mousebind button="Left" action="DoubleClick">
266       <action name="ToggleMaximizeFull"/>
267     </mousebind>
268
269     <mousebind button="Middle" action="Press">
270       <action name="Focus"/>
271       <action name="Lower"/>
272     </mousebind>
273
274     <mousebind button="Up" action="Click">
275       <action name="Shade"/>
276     </mousebind>
277     <mousebind button="Down" action="Click">
278       <action name="Unshade"/>
279     </mousebind>
280
281     <mousebind button="Right" action="Press">
282       <action name="Focus"/>
283       <action name="ShowMenu"><menu>client-menu</menu></action>
284     </mousebind>
285   </context>
286
287   <context name="Top">
288     <mousebind button="Left" action="Press">
289       <action name="Focus"/>
290     </mousebind>
291     <mousebind button="Left" action="Click">
292       <action name="Raise"/>
293     </mousebind>
294     <mousebind button="Left" action="Drag">
295       <action name="Resize"><edge>top</edge></action>
296     </mousebind>
297   </context>
298
299   <context name="Handle">
300     <mousebind button="Left" action="Press">
301       <action name="Focus"/>
302     </mousebind>
303     <mousebind button="Left" action="Click">
304       <action name="Raise"/>
305     </mousebind>
306     <mousebind button="Left" action="Drag">
307       <action name="Resize"><edge>bottom</edge></action>
308     </mousebind>
309
310     <mousebind button="Middle" action="Press">
311       <action name="Focus"/>
312       <action name="Lower"/>
313     </mousebind>
314
315     <mousebind button="Right" action="Press">
316       <action name="Focus"/>
317       <action name="ShowMenu"><menu>client-menu</menu></action>
318     </mousebind>
319   </context>
320
321   <context name="BLCorner">
322     <mousebind button="Left" action="Press">
323       <action name="Focus"/>
324     </mousebind>
325     <mousebind button="Left" action="Click">
326       <action name="Raise"/>
327     </mousebind>
328     <mousebind button="Left" action="Drag">
329       <action name="Resize"/>
330     </mousebind>
331   </context>
332
333   <context name="BRCorner">
334     <mousebind button="Left" action="Press">
335       <action name="Focus"/>
336     </mousebind>
337     <mousebind button="Left" action="Click">
338       <action name="Raise"/>
339     </mousebind>
340     <mousebind button="Left" action="Drag">
341       <action name="Resize"/>
342     </mousebind>
343   </context>
344
345   <context name="TLCorner">
346     <mousebind button="Left" action="Press">
347       <action name="Focus"/>
348     </mousebind>
349     <mousebind button="Left" action="Click">
350       <action name="Raise"/>
351     </mousebind>
352     <mousebind button="Left" action="Drag">
353       <action name="Resize"/>
354     </mousebind>
355   </context>
356
357   <context name="TRCorner">
358     <mousebind button="Left" action="Press">
359       <action name="Focus"/>
360     </mousebind>
361     <mousebind button="Left" action="Click">
362       <action name="Raise"/>
363     </mousebind>
364     <mousebind button="Left" action="Drag">
365       <action name="Resize"/>
366     </mousebind>
367   </context>
368
369   <context name="Client">
370     <mousebind button="Left" action="Press">
371       <action name="Activate"/>
372     </mousebind>
373     <mousebind button="Middle" action="Press">
374       <action name="Activate"/>
375     </mousebind>
376     <mousebind button="Right" action="Press">
377       <action name="Activate"/>
378     </mousebind>
379   </context>
380
381   <context name="Icon">
382     <mousebind button="Left" action="Press">
383       <action name="Focus"/>
384       <action name="ShowMenu"><menu>client-menu</menu></action>
385     </mousebind>
386     <mousebind button="Right" action="Press">
387       <action name="Focus"/>
388       <action name="ShowMenu"><menu>client-menu</menu></action>
389     </mousebind>
390   </context>
391
392   <context name="AllDesktops">
393     <mousebind button="Left" action="Press">
394       <action name="Focus"/>
395     </mousebind>
396     <mousebind button="Left" action="Click">
397       <action name="ToggleOmnipresent"/>
398     </mousebind>
399   </context>
400
401   <context name="Shade">
402     <mousebind button="Left" action="Press">
403       <action name="Focus"/>
404     </mousebind>
405     <mousebind button="Left" action="Click">
406       <action name="ToggleShade"/>
407     </mousebind>
408   </context>
409
410   <context name="Iconify">
411     <mousebind button="Left" action="Press">
412       <action name="Focus"/>
413     </mousebind>
414     <mousebind button="Left" action="Click">
415       <action name="Iconify"/>
416     </mousebind>
417   </context>
418
419   <context name="Maximize">
420     <mousebind button="Left" action="Press">
421       <action name="Focus"/>
422     </mousebind>
423     <mousebind button="Middle" action="Press">
424       <action name="Focus"/>
425     </mousebind>
426     <mousebind button="Right" action="Press">
427       <action name="Focus"/>
428     </mousebind>
429     <mousebind button="Left" action="Click">
430       <action name="ToggleMaximizeFull"/>
431     </mousebind>
432     <mousebind button="Middle" action="Click">
433       <action name="ToggleMaximizeVert"/>
434     </mousebind>
435     <mousebind button="Right" action="Click">
436       <action name="ToggleMaximizeHorz"/>
437     </mousebind>
438   </context>
439
440   <context name="Close">
441     <mousebind button="Left" action="Press">
442       <action name="Focus"/>
443     </mousebind>
444     <mousebind button="Left" action="Click">
445       <action name="Close"/>
446     </mousebind>
447   </context>
448
449   <context name="Desktop">
450     <mousebind button="Up" action="Press">
451       <action name="DesktopPrevious"/>
452     </mousebind>
453     <mousebind button="Down" action="Press">
454       <action name="DesktopNext"/>
455     </mousebind>
456
457     <mousebind button="A-Up" action="Press">
458       <action name="DesktopPrevious"/>
459     </mousebind>
460     <mousebind button="A-Down" action="Press">
461       <action name="DesktopNext"/>
462     </mousebind>
463
464     <mousebind button="Left" action="Press">
465       <action name="Activate"/>
466     </mousebind>
467
468     <!-- Menus -->
469     <mousebind button="Middle" action="Press">
470       <action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
471     </mousebind> 
472     <mousebind button="Right" action="Press">
473       <action name="ShowMenu"><menu>root-menu</menu></action>
474     </mousebind>
475   </context>
476
477   <context name="MoveResize">
478     <mousebind button="Up" action="Press">
479       <action name="DesktopPrevious"/>
480     </mousebind>
481     <mousebind button="Down" action="Press">
482       <action name="DesktopNext"/>
483     </mousebind>
484     <mousebind button="A-Up" action="Press">
485       <action name="DesktopPrevious"/>
486     </mousebind>
487     <mousebind button="A-Down" action="Press">
488       <action name="DesktopNext"/>
489     </mousebind>
490   </context>
491 </mouse>
492
493 <menu>
494   <!-- You can specify more than one menu file in here and they are all loaded,
495        just don't make menu ids clash or, well, it'll be kind of pointless -->
496
497   <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
498   <file>menu.xml</file>
499   <hideDelay>200</hideDelay>
500   <middle>no</middle>
501   <submenuShowDelay>100</submenuShowDelay>
502   <applicationIcons>yes</applicationIcons>
503 </menu>
504
505 <!-- this section is commented out.. remove this and the ending comment if you
506      want to use it -->
507 <applications>
508   <!-- the name or the class can be set, or both. this is used to match
509        windows when they appear
510
511        role can optionally be set, and only as much as you provide will be 
512        checked to see if it matches, eg. if you set role="abc" and the window's
513        role is actually "abcde" it would match.
514  -->
515   <application name="first element of window's WM_CLASS property (see xprop)"
516               class="second element of window's WM_CLASS property (see xprop)"
517                role="the window's WM_WINDOW_ROLE property (see xprop)">
518
519     <!-- each element can be left out or set to 'default' to specify to not 
520          change that attribute of the window -->
521
522     <decor>yes</decor>
523
524     <shade>no</shade>
525
526     <position>
527       <!-- the position is only used if both an x and y coordinate are provided
528            (and not set to 'default') -->
529       <x>center</x>
530       <!-- a number or 'center' to center on screen -->
531       <y>200</y>
532       <!-- a number or 'center' to center on screen -->
533       <monitor>1</monitor>
534       <!-- specifies the monitor in a xinerama setup.
535            1 is the first head, or 'mouse' for wherever the mouse is -->
536     </position>
537
538     <focus>yes</focus>
539     <!-- if the window should try be given focus when it appears -->
540
541     <desktop>1</desktop>
542     <!-- 1 is the first desktop, 'all' for all desktops -->
543
544     <layer>normal</layer>
545     <!-- 'above', 'normal', or 'below' -->
546
547     <iconic>no</iconic>
548
549     <skip_pager>no</skip_pager>
550     <!-- asks to not be shown in pagers -->
551
552     <skip_taskbar>no</skip_taskbar>
553     <!-- asks to not be shown in taskbars. window cycling actions will also
554          skip past such windows -->
555
556     <fullscreen>yes</fullscreen>
557
558     <maximized>true</maximized>
559     <!-- 'Horizontal', 'Vertical' or boolean (yes/no/on/off/true/false) -->
560   </application>
561 </applications>
562  -->
563
564 </openbox_config>