3

The usual way of accessing the applications menu in Openbox is by right clicking on an empty spot of your Openbox desktop or by binding a key to the ShowMenu-action in the rc.xml file.

I would like to add a button to the Tint2 panel that shows the applications menu. That's where I'm stuck. I can't figure out, what command I should use to show the applications menu.

What bash command does show the applications menu in Openbox?

1 Answer 1

2

You don't need to add a button per se, you can simply forward the mouse event from your panel directly to your window manager (in this case openbox) which allows you to right-click any empty space in the tint2 panel to get the menu.

From the tint2 panel configuration guide you want to read this:

wm_menu = boolean (0 or 1) : Defines if tint2 forwards unhandled mouse events to your window manager. Useful for window managers such as openbox, which display the start menu if you right click on the desktop.

You need to edit your config file and navigate to the panel section of the configuration and add the following:

wm_menu = 1

Save and restart tint2 and you should now be able to right-click any empty region of your panel for a menu.

I am not aware of a way to send events directly to openbox from the command line.

An alternative is configuring openbox to use a key binding (I use the redundant Windows key) to show the menu. You can then use xdotool to push the key for you as described in How can I press the Windows key with xdotool

Then you can add a section into your tint2 config file

button = new
button_text = Start
button_font_color = #ababab 100
button_lclick_command = xdotool key super

Then just modify your panel config line by adding P to the beginning i.e

panel_items = P:LTSC
1
  • Thank you for all your time and ideas. Currently, I am using your first solution (forwarding the mouse-events and right-click on the panel). xdotool would give me the result I am looking for, but simulating key strokes with an external tool is such an ugly way (security concerns aside) for dealing with such a simple problem that I just can't do it. Great and thorough answer!
    – Max M.
    Jun 19, 2019 at 16:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .