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