Openbox Keyboard Shortcuts – How to Assign to Specific Applications

keyboard shortcutsopenbox

I use the web browser Uzbl and the window manager Openbox, and I wondered if I could configure openbox to add a keyboard shortcut to minimize / maximize Uzbl's window …

Best Answer

Alt+Space, x is the default shortcut for maximize/unmaximize in most window managers. Does that work?

Or maybe it's Alt+F6 and Alt+F7 as suggested in the Actions Documentation.

If not, you can add a binding using the information in the Openbox Bindings Documentation, but it sounds like you can only set shortcuts for all windows, not just for one program.

In brief, you find your rc.xml file, then add something like this in the middle of it:

<keybind key="A-F6">
  <action name="MaximizeFull"/>
</keybind>

Unless you meant unminimize / restore rather than maximize, i.e. a binding that works even when the window isn't focussed.

In that case, I'd suggest using xbindkeys and wmctrl. You'd have to write a script that runs wmctrl to find the uzbl window using wmctrl -l, then run either wmctrl -a <win> or wmctrl -R <win>, then add an entry in .xbindkeysrc to run that script whenever a specific keyboard combination was pressed.

Related Question