Help:Actions

From Openbox

(Difference between revisions)
Jump to: navigation, search
(Execute)
Line 1: Line 1:
Actions are used to specify the behavior of Openbox.  Actions are used in both [[Help:Bindings|keyboard and mouse bindings]].
 
 
= Actions =
 
As discussed in the [[Help:Bindings|keyboard and mouse bindings guide]], actions are used inside these bindings.  You can put more than one action in a row in any binding to have it perform more than one action.
 
 
Here are a couple examples of actions, with and without parameters:
 
<code><pre>
 
<keybind key="A-Tab">
 
  <action name="NextWindow"/>
 
</keybind>
 
<keybind key="A-S-Tab">
 
  <action name="PreviousWindow"/>
 
</keybind>
 
<keybind key="C-A-Tab">
 
  <action name="NextWindow">
 
    <panels>yes</panels><desktop>yes</desktop>
 
  </action>
 
</keybind>
 
</pre></code>
 
 
== Syntax ==
 
The full syntax for an action is:
 
<code><pre><action name="NAME">OPTIONS</action></pre></code>
 
 
If you are not setting any parameters, you can use this (but don't forget the trailing "/" !):
 
<code><pre><action name="NAME" /></pre></code>
 
 
=== Name ===
 
The '''NAME''' is the name of the action, which specifies which action to run.  See the [[#List of actions|list of actions]] to see what names are possible.
 
 
=== Options ===
 
The '''OPTIONS''' are 0 or more options for the given action, that change how the action will behave.  Each action has its own options, and some don't have any.  See the [[#List of actions|list of actions]] to see the options available to each action.
 
 
Options are specified such as this:
 
<code><pre>
 
<action name="NAME">
 
  <option1>value</option1>
 
  <option2>value</option2>
 
  ...
 
</action>
 
</pre></code>
 
 
=== List of actions ===
 
 
==== Global actions ====
 
==== Global actions ====
 
These actions are not used to manipulate windows.  As such, they work whether a window is currently focused or not.
 
These actions are not used to manipulate windows.  As such, they work whether a window is currently focused or not.
Line 56: Line 13:
 
|style="text-align:center"|""
 
|style="text-align:center"|""
 
|A string which is the command to be executed, along with any arguments to be passed to it.  The "~" tilde character which is expanded to your home directory, but no other shell expansions or scripting syntax may be used in the command.
 
|A string which is the command to be executed, along with any arguments to be passed to it.  The "~" tilde character which is expanded to your home directory, but no other shell expansions or scripting syntax may be used in the command.
 +
|-
 +
|<startupnotify><enabled>
 +
|no
 +
|A boolean (yes/no) which says if the startup notification protocol should be used to notify other programs that an application is launching. 
 
|}
 
|}
 +
 +
Example:
 +
<code><pre>

Revision as of 18:44, 4 June 2007

Global actions

These actions are not used to manipulate windows. As such, they work whether a window is currently focused or not.

Execute

Runs a program

Option Default Value Description
<execute> "" A string which is the command to be executed, along with any arguments to be passed to it. The "~" tilde character which is expanded to your home directory, but no other shell expansions or scripting syntax may be used in the command.
<startupnotify><enabled> no A boolean (yes/no) which says if the startup notification protocol should be used to notify other programs that an application is launching.

Example:

Personal tools