[openbox] How to bind the Super key (just the super key)?

seanh snhmnd at gmail.com
Thu Sep 5 06:21:49 EDT 2013


> First, the Client Menu can be embedded in the Root menu, this is what I
> do:
> 
> <menu id="root-menu" label="Openbox 3">
>   ...
>   <menu id="client-list-combined-menu" />
>   ...
> </menu>

Yeah, I have that as well, but I find it a bit too annoying to have to
activate the root menu, then move the selection to the Windows item,
then hit the right arrow key, then finally start selecting a window.

What I'd really want is an Openbox menu that behaves like this:

- Launchers for my favourite apps etc, as in a normal root menu
  (and also support any other normal menu items I might add, e.g. to
  logout etc)

- Open windows are also shown in the menu, but inline, not in a sub menu

- If I have e.g. a launcher for Firefox and I also have multiple Firefox
  windows open, this would not create multiple Firefox entries in the
  menu, there'd be only the single Firefox entry but when selected it
  would raise one of the Firefox windows, not open a new Firefox window.

- When no Firefox windows are open, the Firefox item would still be
  shown in the menu, clicking it would open a new Firefox window

- For apps that I don't specify a launcher for in the menu, those apps
  would only appear in the menu when they have windows open, otherwise
  they'd be missing.

  If one of these apps has multiple windows open, only one item for it
  appears in the menu, clicking it raises one of the windows, but the
  item also has a submenu attached where you can select a specific
  window.

- Launchers would have a dot next to them if there's a window for that
  app open, two dots if two windows, and three dots if three or more
  windows

- When a launcher has some windows open, it also has a submenu attached
  where you can select a specific window to raise (but you can also just
  click on the launcher itself without opening the submenu, and this
  would just raise one of the windows)

I think this is pretty much how the Dock behaves in OS X, and the panel
in Ubuntu Unity, for example.

Openbox menus don't support this behavior by default, but I'm wondering
if it would be possible to write a pipe menu to do it?

The pipe menu script would have to handle all the behavior itself,
including:

- Reading a config file to see what launchers and other items to place
  in the menu

- Getting the list of open windows, adding them to the menu

- Figuring out when multiple open windows belong to the same app, and
  merging them into a single menu item with a submenu attached

- Figuring out when multiple windows belong to the same app as a
  launcher, and merging them into one menu item

- Adding the dots to indicate 0, 1, 2 or 3 or more open windows for an
  app

- Deciding what to do when an item is selected: launch an app, or raise
  a window (and which window to raise) and making it happen

I don't yet know how you'd do all this but it seems like something that
might be possible.

> Second, I find it most natural to bind the Menu key, rather than any
> other key, to this action.  Don't you agree?

Yeah that's a good key for it, but unfortunately my laptop keyboard
doesn't have a Menu key, so I'm using Right Shift instead. That's good
enough, Right Shift is a big key that's easy to hit and I never use it
for anything else.


More information about the openbox mailing list