[openbox] make the root-menu appear at a fixed location when opening it with a keyboard shortcut, possible?

Plmalternate Plmalternate plmalternate at gmail.com
Tue Sep 23 17:13:58 EDT 2014


> Message: 1
> Date: Mon, 22 Sep 2014 14:45:49 -0500
> From: John Bell <johnfbell3 at gmail.com>
> To: openbox mailing list <openbox at icculus.org>
> Subject: Re: [openbox] make the root-menu appear at a fixed location
> 	when opening it with a keyboard shortcut, possible?
> Message-ID:
> 	<CAF9_zTHH=n-b0yo7opf_rzaN9sEg3zQUk=zLacgZ2aoadc24Wg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I've tried to do this with xdotool and wmctrl and couldn't get it to work.
> This functionality is at the top of my christmas wish list.
>
> On Sun, Sep 21, 2014 at 6:29 AM, TT <turkuting at gmail.com> wrote:
>
>> i think you would need a helper like xdotool for that.
>> but it would also make the mouse jump to that point i guess.
>>
>>
>>
>> Plmalternate Plmalternate wrote:
>>
>>> When opening the root menu with a keybinding, is it possible to have
>>> it open in a pre-set location rather that wherever the pointer happens
>>> to be?
>>> _______________________________________________
>>> openbox mailing list
>>> openbox at icculus.org
>>> http://icculus.org/mailman/listinfo/openbox
>>>
>>
>> _______________________________________________
>> openbox mailing list
>> openbox at icculus.org
>> http://icculus.org/mailman/listinfo/openbox
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://icculus.org/pipermail/openbox/attachments/20140922/40de59cb/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 22 Sep 2014 22:15:29 +0200
> From: Sébastien <ml at terranean.eu>
> To: openbox at icculus.org
> Subject: Re: [openbox] make the root-menu appear at a fixed location
> 	when opening it with a keyboard shortcut, possible?
> Message-ID: <20140922221529.27667562 at sentinel>
> Content-Type: text/plain; charset=UTF-8
>
> le 2014-09-21 à 06:54, Plmalternate écrivit:
>> When opening the root menu with a keybinding, is it possible to have
>> it open in a pre-set location rather that wherever the pointer happens
>> to be?
>
> I answered a similar question earlier this year which might help:
> http://icculus.org/pipermail/openbox/2014-January/008430.html
>
> Hope this helps,
>
> --
> Sébastien
>
> ------------------------------
Thank you all, gentlesapients.
Here is what I got to work:

I set a keybinding to this bash script:

#! /bin/bash
xte 'mousemove 3 3'
sleep 1
xte 'mouseclick 3'

The "xte 'mousemove 3 3'"  puts the pointer in a space occupied by a
small conky window, which passes any click on to the root window.

The "sleep 1" gives me enough time to get my fingers off the keys
before the following "xte 'mouseclick 3'", which is a right click.
Otherwise the right click is modified by the key or keys still being
held down. I'd love to have a more elegant way to do this, both so
that I wouldn't have to remember to release the keys promptly, and so
the menu would pop up quicker, but so far that's the best I've come up
with.

The trickiest part was finding a keybinding that wouldn't be
intercepted by any application likely to have a focused window. Partly
for this reason, I hate programs having keybindings enabled by
default. Is there some way to to give Openbox priority, so that it
intercepts all keybound combinations and only passes them on to the
application with the focused window if the keybound combination isn't
specified in ~/.config/openbox/rc.xml, or maybe even better, doesn't
pass them on at all, or perhaps best of all, passes on only specified
keycodes to specified applications? Like for instance, specify in
rc.xml something like "If gedit has focus, pass on control-c and
control-v, but don't pass on anything I haven't explicitly told you
to."

One can always find some ridiculously complicated key combination that
none of your programs use, but I much prefer to have a small set of
higly mnemonic keybindings, rather than a huge number of arbitrary
ones. I'm not sure what the custom of this list in on
thread-topic-drift. If I should have posted these follow-ups as
seperate topics, please say so and I'll try to conform to native
customs as best as I understand it. Thanks.


More information about the openbox mailing list