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 ...
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
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.
In that case, I'd suggest using xbindkeys and wmctrl.
I've googled for "wmctrl examples" and I found http://spiralofhope.com/wmctrl-examples.html#s12
So I added the following lines to my openbox configuration:
<keybind key="C-F1"> <action name="Execute"> <execute>wmctrl -x uzbl-tabbed -a uzbl-tabbed.Uzbl-tabbed -b toggle,hidden</execute> </action> </keybind>
It works exactly as I wanted!