[openbox] Mousebind In Client Context

Paul openboxml023478 at rainslide.net
Sun Aug 7 06:51:42 EDT 2011


I have this, which closes whichever window the cursor is over:

<mouse>
     <context name="Frame">
       <mousebind button="Button8" action="Click">
           <action name="Close"/>
       </mousebind>
     </context>
</mouse>

I'd like that when the cursor is in the Client context of an Opera window, and I press Button8, instead of closing Opera, it closes the tab, ie. issues a ctrl-w key press. I can issue the ctrl-w with xdotool in an <action>...<command>, but what I don't know is how to define that within an Opera Client context only. I'm thinking something like this:

<mouse>
     <context name="Client">
         <application class="Opera" name="opera" type="normal">
             <mousebind button="Button8" action="Click">
                 <action name="Execute">
                     <command>xdotool key ctrl+w</command>
                 </action>
             </mousebind>
         </application>
     </context>
</mouse>

When I put the <application> block into my Client context section, Openbox doesn't give an error when I reconfigure it, but neither does it make a difference.

-- 

.


More information about the openbox mailing list