Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 ...

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.