Help:Actions
From Openbox
Actions are used both in key and mouse bindings and in menus.
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 will be 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:
<keybind key="W-space">
<action name="Execute">
<startupnotify>
<enabled>yes</enabled>
<name>Terminal</name>
</startupnotify>
<execute>gnome-terminal</execute>
</action>
</keybind>
<keybind key="W-t">
<action name="Execute"><execute>xterm</execute></action>
</keybind>
ShowMenu
Shows a menu by name.
Openbox provides a number of built-in menus:
-
client-list-combined-menu
- A list of all windows, across all desktops -
client-list-menu
- A list of all windows, separated into sub menus by desktop -
client-menu
- A menu to control a window, such as to maximize or iconify it- This menu will only show with a key bindings if an application window is focused, and for mouse bindings if the mouse event was on an application window (or its decorations).
In addition, the default configuration provides this menu in the menu.xml
file:
-
root-menu
- An example menu containing some applications and options for controlling Openbox
Option | Default Value | Description |
---|---|---|
<menu> | "" | The name of the menu to be shown. Names of menus are specified in the menu file, in the id attribute of the <menu> tag. |
Example:
<keybind key="A-space">
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</keybind>
</keybind>
<mousebind button="Right" action="Press">
<action name="Activate"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="ShowMenu">
<menu>client-list-combined-menu</menu>
</action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</mousebind>
NextWindow
Cycles focus to the next window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with icons for all the windows which can be focused. |
<allDesktops> | no | A boolean (yes/no) which when enabled lets you cycle focus between windows on all desktops, instead of only on the current desktop. |
<panels> | no | A boolean (yes/no) which when enabled lets you cycle focus to/between panel windows such as your taskbar. This can be combined with <desktop>. |
<desktop> | no | A boolean (yes/no) which when enabled lets you cycle focus to the desktop window, if one exists (such as in GNOME or KDE). This can be combined with <panels>. |
<linear> | no | A boolean (yes/no) which when enabled causes focus to cycle in a fixed ordering, rather than in the order which windows have been last focused. |
Example:
<keybind key="A-Tab">
<action name="NextWindow"/>
</keybind>
<keybind key="C-A-Tab">
<action name="NextWindow">
<panels>yes</panels>
<desktop>yes</desktop>
</action>
</keybind>
PreviousWindow
Cycles focus to the previous window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with icons for all the windows which can be focused. |
<allDesktops> | no | A boolean (yes/no) which when enabled lets you cycle focus between windows on all desktops, instead of only on the current desktop. |
<panels> | no | A boolean (yes/no) which when enabled lets you cycle focus to/between panel windows such as your taskbar. This can be combined with <desktop>. |
<desktop> | no | A boolean (yes/no) which when enabled lets you cycle focus to the desktop window, if one exists (such as in GNOME or KDE). This can be combined with <panels>. |
<linear> | no | A boolean (yes/no) which when enabled causes focus to cycle in a fixed ordering, rather than in the order which windows have been last focused. |
Example:
<keybind key="A-S-Tab">
<action name="PreviousWindow"/>
</keybind>
<keybind key="C-A-S-Tab">
<action name="PreviousWindow">
<panels>yes</panels>
<desktop>yes</desktop>
</action>
</keybind>
DirectionalFocusNorth
Cycles focus to the window north of the currently focused window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with the name and icon of the window which will be focused. |
Example:
<keybind key="W-Up">
<action name="DirectionalFocusNorth"><dialog>yes</dialog></action>
</keybind>
DirectionalFocusSouth
Cycles focus to the window south of the currently focused window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with the name and icon of the window which will be focused. |
Example:
<keybind key="W-Down">
<action name="DirectionalFocusSouth"/>
</keybind>
DirectionalFocusEast
Cycles focus to the window east of the currently focused window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with the name and icon of the window which will be focused. |
Example:
<keybind key="W-Right">
<action name="DirectionalFocusEast"><dialog>yes</dialog></action>
</keybind>
DirectionalFocusWest
Cycles focus to the window west of the currently focused window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with the name and icon of the window which will be focused. |
Example:
<keybind key="W-Left">
<action name="DirectionalFocusWest"/>
</keybind>
DirectionalFocusNorthWest
Cycles focus to the window north-west of the currently focused window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with the name and icon of the window which will be focused. |
Example:
<keybind key="W-Up">
<action name="DirectionalFocusNorthWest"><dialog>yes</dialog></action>
</keybind>
DirectionalFocusNorthEast
Cycles focus to the window north-east of the currently focused window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with the name and icon of the window which will be focused. |
Example:
<keybind key="W-Up">
<action name="DirectionalFocusNorthEast"/>
</keybind>
DirectionalFocusSouthWest
Cycles focus to the window south-west of the currently focused window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with the name and icon of the window which will be focused. |
Example:
<keybind key="W-Up">
<action name="DirectionalFocusSouthWest"><dialog>yes</dialog></action>
</keybind>
DirectionalFocusSouthEast
Cycles focus to the window South-east of the currently focused window.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which specifies if a dialog is shown on screen with the name and icon of the window which will be focused. |
Example:
<keybind key="W-Up">
<action name="DirectionalFocusSouthEast"/>
</keybind>
Desktop
Changes the visible desktop.
Option | Default Value | Description |
---|---|---|
<desktop> | 1 | The number of the desktop to switch to, starting from 1. |
Example:
<keybind key="W-F1">
<action name="Desktop"><desktop>1</desktop></action>
</keybind>
<keybind key="W-F2">
<action name="Desktop"><desktop>2</desktop></action>
</keybind>
DesktopNext
Make the next desktop visible.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which makes a dialog be shown on screen which shows a simple pager and the desktop names for switching. This option can't be used for mouse bindings. |
<wrap> | yes | A boolean (yes/no) which when enabled lets you wrap around from the last desktop to the first, and vice versa. |
Example:
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<keybind key="C-A-Right">
<action name="DesktopNext"><wrap>no</wrap></action>
</keybind>
DesktopPrevious
Make the previous desktop visible.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which makes a dialog be shown on screen which shows a simple pager and the desktop names for switching. This option can't be used for mouse bindings. |
<wrap> | yes | A boolean (yes/no) which when enabled lets you wrap around from the last desktop to the first, and vice versa. |
Example:
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<keybind key="C-A-Right">
<action name="DesktopPrevious"><wrap>no</wrap></action>
</keybind>
DesktopLeft
Make the desktop to the left of the current desktop visible.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which makes a dialog be shown on screen which shows a simple pager and the desktop names for switching. This option can't be used for mouse bindings. |
<wrap> | yes | A boolean (yes/no) which when enabled lets you wrap around from the last desktop to the first, and vice versa. |
Example:
<keybind key="C-A-Left">
<action name="DesktopLeft"><wrap>no</wrap></action>
</keybind>
DesktopRight
Make the desktop to the right of the current desktop visible.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which makes a dialog be shown on screen which shows a simple pager and the desktop names for switching. This option can't be used for mouse bindings. |
<wrap> | yes | A boolean (yes/no) which when enabled lets you wrap around from the last desktop to the first, and vice versa. |
Example:
<keybind key="C-A-Right">
<action name="DesktopRight"><wrap>no</wrap></action>
</keybind>
DesktopUp
Make the desktop above the current desktop visible.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which makes a dialog be shown on screen which shows a simple pager and the desktop names for switching. This option can't be used for mouse bindings. |
<wrap> | yes | A boolean (yes/no) which when enabled lets you wrap around from the last desktop to the first, and vice versa. |
Example:
<keybind key="C-A-Up">
<action name="DesktopUp"><wrap>no</wrap></action>
</keybind>
DesktopDown
Make the desktop below the current desktop visible.
Option | Default Value | Description |
---|---|---|
<dialog> | yes | A boolean (yes/no) which makes a dialog be shown on screen which shows a simple pager and the desktop names for switching. This option can't be used for mouse bindings. |
<wrap> | yes | A boolean (yes/no) which when enabled lets you wrap around from the last desktop to the first, and vice versa. |
Example:
<keybind key="C-A-Down">
<action name="DesktopDown"><wrap>no</wrap></action>
</keybind>
DesktopLast
Make the most recently visible desktop visible again. Only one desktop is remembered, so using this twice will simply flip between two desktops.
Example:
<keybind key="W-space">
<action name="DesktopLast"/>
</keybind>
ToggleShowDesktop
Hides all windows so that the desktop is visible, and gives focus to the desktop window if one exists (such as in GNOME and KDE). You can also use the action again to show the windows again, if no windows have become visible yet.
Example:
<keybind key="W-d">
<action name="ToggleShowDesktop"/>
</keybind>
ShowDesktop
Hides all windows so that the desktop is visible, and gives focus to the desktop window if one exists (such as in GNOME and KDE). Normally, what you want is ToggleShowDesktop.
Example:
<keybind key="C-A-d">
<action name="ShowDesktop"/>
</keybind>
UnshowDesktop
When ShowDesktop or ToggleShowDesktop was used, and no windows have become visible yet, this will show the hidden windows. Normally, what you want is ToggleShowDesktop.
Example:
<keybind key="C-A-d">
<action name="UnshowDesktop"/>
</keybind>
ToggleDockAutohide
Toggles the autohide setting on the dock temporarily. This effectively means you can show/hide the dock with a keybinding.
Example:
<keybind key="C-A-d">
<action name="ToggleDockAutohide"/>
</keybind>
Reconfigure
Prompts Openbox to reload its config file, menu and theme.
Example:
<keybind key="W-F11">
<action name="Reconfigure"/>
</keybind>
Restart
Restarts Openbox. This starts a new copy of Openbox, and can be used to upgrade to a newly installed version without logging out of your X session.
Example:
<keybind key="W-F12">
<action name="Restart"/>
</keybind>
Exit
Exits Openbox.
Example:
<keybind key="C-A-S-F12">
<action name="Exit"/>focus
</keybind>
Window actions
These actions are used to control windows. For key bindings, they operate on the currently focused window. For mouse bindings they operate on the window being clicked/dragged on.
Activate
Focuses, raises, and unshades a window.
Example:
<mousebind button="A-Left" action="Press">
<action name="Activate"/>
</mousebind>
Focus
Focuses a window.
Example:
<mousebind button="A-Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
Raise
Raises a window above other windows in its layer.
Example:
<mousebind button="A-Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
Lower
Lowers a window below other windows in its layer.
Example:
<mousebind button="A-Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
RaiseLower
Raises the window if it is currently behind any other windows in its layer. Lowers the window if it is above all other windows in its layer.
Example:
<keybind key="C-A-r">
<action name="RaiseLower"/>
</keybind>
Unfocus
Move focus off of the window. Usually used in conjuction with FocusToBottom.
Example:
<mousebind button="A-Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
FocusToBottom
Move the window to the bottom of the recently-used-windows list. This means that other windows will be given preference when selecting which window to focus. Usually used in conjuction with Unfocus.
Example:
<keybind key="A-Escape">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</keybind>
Iconify
Iconify (a.k.a. minimize) the window.
Example:
<mousebind button="Left" action="Click">
<action name="Iconify"/>
</mousebind>
Close
Close the window.
Example:
<keybind key="A-F4">
<action name="Close"/>
</keybind>