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