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