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