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