Add window menu

This commit is contained in:
Consolatis 2022-01-26 00:07:10 +01:00 committed by Johan Malm
parent 4bc8726abd
commit 759b26b5c1
12 changed files with 108 additions and 11 deletions

View file

@ -50,7 +50,7 @@ Actions are used in keyboard bindings.
Re-load configuration and theme files.
*<action name="ShowMenu"><menu>*
Show menu. Valid menu name is "root-menu".
Show menu. Valid menu names are "root-menu" and "client-menu".
*<action name="ToggleDecorations">*
Toggle decorations of focused window.

View file

@ -120,6 +120,7 @@ Configuration must be wrapped in a <labwc_config> root-node.
Define a mouse binding. Supported context-names include:
- TitleBar: The area where the title of the window is shown.
- Title: The title of the window itself.
- WindowMenu: The button on the left.
- Iconify: The button that looks like an underline.
- Maximize: The button that looks like a box.
- Close: The button that looks like an X.

View file

@ -1,7 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu>
<menu id="client-menu" label="ClientMenu">
<item label="Minimize">
<action name="Iconify" />
</item>
<item label="Maximize">
<action name="ToggleMaximize" />
</item>
<item label="Fullscreen">
<action name="ToggleFullscreen" />
</item>
<item label="Decorations">
<action name="ToggleDecorations" />
</item>
<item label="Close">
<action name="Close" />
</item>
</menu>
<menu id="root-menu" label="">
<item label="Web browser">
<action name="Execute"><command>firefox</command></action>

View file

@ -97,6 +97,9 @@
<keybind key="W-Down">
<action name="SnapToEdge"><direction>down</direction></action>
</keybind>
<keybind key="A-Space">
<action name="ShowMenu"><menu>client-menu</menu></action>
</keybind>
<keybind key="XF86_AudioLowerVolume">
<action name="Execute"><command>amixer sset Master 5%-</command></action>
</keybind>
@ -190,6 +193,13 @@
<mousebind button="Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="Right" action="Click">
<action name="Focus" />
<action name="Raise" />
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
<mousebind button="Left" action="DoubleClick">
<action name="Focus"/>
<action name="Raise"/>