Help:Configuration

From Openbox

(Difference between revisions)
Jump to: navigation, search
m
(fix grammar, add underMouse)
Line 1: Line 1:
Openbox configuration is made essentially by modifying just one file called ''rc.xml''. Default configuration file should be found from ''/etc/xdg/openbox/'' and user specific file should be placed in ''~/.config/openbox/''. By default there is also menu.xml which is for menu configuration. Menu configuration is separated from rest of the configs for clarity but it is not necessary. ''rc.xml'' is separated into 11 different sections. All the options are discussed below with examples.
+
Openbox configuration is made essentially by modifying just one file called ''rc.xml''. Default configuration file can by default be found in ''/etc/xdg/openbox/'' and a user specific file can be placed in ''~/.config/openbox/''. By default there is also menu.xml which is for menu configuration. Menu configuration is separated from rest of the configs. ''rc.xml'' is separated into different sections. All the options are discussed below with examples.
  
  
Line 9: Line 9:
 
</resistance>
 
</resistance>
 
</pre>
 
</pre>
'''strength''' tag tells Openbox how much resistance(in pixels) there is between two windows before it lets them overlap. <br>
+
'''strength''' Tells Openbox how much resistance (in pixels) there is between two windows before it lets them overlap.<br>
'''screen_edge_strength''' tag is basically the same as ''strength'' tag but between window and the screen edge.
+
'''screen_edge_strength''' Basically the same as ''strength'' but between window and the screen edge.
  
 
== Focus ==
 
== Focus ==
Line 22: Line 22:
 
</focus>
 
</focus>
 
</pre>
 
</pre>
When '''focusNew''' tag is set to 'yes' Openbox will automatically give focus to new windows when they are created, otherwise the focus will stay as it is.<br>
+
'''focusNew''' Openbox will automatically give focus to new windows when they are created, otherwise the focus will stay as it is.<br>
'''focusLast'''<br>
+
'''followMouse''' Makes focus follow mouse. e.g. when the mouse is being moved the focus will be given to window under the mouse cursor.<br>
'''followMouse''' tag will make focus follow mouse. e.g. when mouse is being moved the focus will always be given to window under the mouse cursor.<br>
+
'''focusLast''' When switching desktops, focus the last focused window on that desktop again, regardless of where the mouse is. Only applies ''followMouse'' is set.<br>
'''focusDelay''' tag only applies if ''followMouse'' is also set. focusDelay is time(in milliseconds) how much Openbox will wait before giving focus to the window under mouse cursor.<br>
+
'''focusDelay''' The time (in milliseconds) Openbox will wait before giving focus to the window under mouse cursor. Only applies if ''followMouse'' is set.<br>
'''raiseOnFocus''' causes window being raised to top when given focus.
+
'''underMouse''' Focus windows under the mouse not only when the mouse moves, but also when it enters another window due to other reasons (e.g. the window the mouse was in moved/closed/iconified etc). Only applies if ''followMouse'' is set.<br>
 +
'''raiseOnFocus''' Also raises windows to top when they are focused. Only applies if ''followMouse'' is set.
  
 
== Placement ==
 
== Placement ==
Line 77: Line 78:
 
</theme>
 
</theme>
 
</pre>
 
</pre>
'''name''' tag is the name of the Openbox theme being used.<br>
+
'''name''' The name of the Openbox theme to use.<br>
'''titleLayout''' tells in which order and what buttons should be on window's titlebar. Following letters can be used, each only once.[[Image:MSLDNI.png|right|frame|titleLayout example using <titleLayout>MSLDNI</titleLayout>]][[Image:CLIM.png|right|frame|another titleLayout example using <titleLayout>CLIM</titleLayout>]]
+
'''titleLayout''' tells in which order and what buttons should be in a window's titlebar. The following letters can be used, each only once.[[Image:MSLDNI.png|right|frame|titleLayout example using <titleLayout>MSLDNI</titleLayout>]][[Image:CLIM.png|right|frame|another titleLayout example using <titleLayout>CLIM</titleLayout>]]
 
*N :window icon
 
*N :window icon
 
*L :window label (aka. title)
 
*L :window label (aka. title)
Line 86: Line 87:
 
*S: shade (roll up/down)
 
*S: shade (roll up/down)
 
*D: omnipresent (on all desktops).
 
*D: omnipresent (on all desktops).
'''keepBorder''' tells if window should keep the borderline drawn by Openbox when using ''decorate'' option.<br>
+
'''keepBorder''' tells if windows should keep the border drawn by Openbox when window decorations are turned off.<br>
 
'''animateIconify''' adds a little iconification animation if enabled.
 
'''animateIconify''' adds a little iconification animation if enabled.

Revision as of 14:12, 19 August 2010

Openbox configuration is made essentially by modifying just one file called rc.xml. Default configuration file can by default be found in /etc/xdg/openbox/ and a user specific file can be placed in ~/.config/openbox/. By default there is also menu.xml which is for menu configuration. Menu configuration is separated from rest of the configs. rc.xml is separated into different sections. All the options are discussed below with examples.


Contents

Resistance

<resistance>
  <strength>10</strength>
  <screen_edge_strength>20</screen_edge_strength>
</resistance>

strength Tells Openbox how much resistance (in pixels) there is between two windows before it lets them overlap.
screen_edge_strength Basically the same as strength but between window and the screen edge.

Focus

<focus>
  <focusNew>yes</focusNew>
  <focusLast>yes</focusLast>
  <followMouse>no</followMouse>
  <focusDelay>200</focusDelay>
  <raiseOnFocus>no</raiseOnFocus>
</focus>

focusNew Openbox will automatically give focus to new windows when they are created, otherwise the focus will stay as it is.
followMouse Makes focus follow mouse. e.g. when the mouse is being moved the focus will be given to window under the mouse cursor.
focusLast When switching desktops, focus the last focused window on that desktop again, regardless of where the mouse is. Only applies followMouse is set.
focusDelay The time (in milliseconds) Openbox will wait before giving focus to the window under mouse cursor. Only applies if followMouse is set.
underMouse Focus windows under the mouse not only when the mouse moves, but also when it enters another window due to other reasons (e.g. the window the mouse was in moved/closed/iconified etc). Only applies if followMouse is set.
raiseOnFocus Also raises windows to top when they are focused. Only applies if followMouse is set.

Placement

<placement>
  <policy>Smart</policy>
</placement>

policy can be either Smart or UnderMouse.

  • Smart will cause new windows to be placed automatically by Openbox.
  • UnderMouse makes new windows to be placed under the mouse cursor.

Theme

<theme>
  <name>Clearlooks</name>
  <titleLayout>NLIMC</titleLayout>
  <keepBorder>yes</keepBorder>
  <animateIconify>yes</animateIconify>
  <font place="ActiveWindow">
    <name>sans</name>
    <size>8</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
  <font place="InactiveWindow">
    <name>sans</name>
    <size>8</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
  <font place="MenuHeader">
    <name>sans</name>
    <size>9</size>
    <weight>normal</weight>
    <slant>normal</slant>
  </font>
  <font place="MenuItem">
    <name>sans</name>
    <size>9</size>
    <weight>normal</weight>
    <slant>normal</slant>
  </font>
  <font place="OnScreenDisplay">
    <name>sans</name>
    <size>9</size>
    <weight>bold</weight>
    <slant>normal</slant>
  </font>
</theme>

name The name of the Openbox theme to use.

titleLayout tells in which order and what buttons should be in a window's titlebar. The following letters can be used, each only once.
(thumbnail)
titleLayout example using <titleLayout>MSLDNI</titleLayout>
(thumbnail)
another titleLayout example using <titleLayout>CLIM</titleLayout>
  • N :window icon
  • L :window label (aka. title)
  • I: iconify
  • M: maximize
  • C: close
  • S: shade (roll up/down)
  • D: omnipresent (on all desktops).

keepBorder tells if windows should keep the border drawn by Openbox when window decorations are turned off.
animateIconify adds a little iconification animation if enabled.

Personal tools