[openbox] Using screen size in key bindings

Mikael Magnusson lists at bak.och.fr.am
Wed Mar 11 18:48:59 EDT 2009


Please don't top post

On Wed, 11 Mar 2009, Kai Großjohann wrote:

> On Wed, 11 Mar 2009 07:09:02 -0400
> "openbox at jelmail.com" <openbox at jelmail.com> wrote:
>
>> Hello,
>> I've just signed up to Openbox and like it so far. I have written
>> some key bindings to relocate windows in a similar fashion to the
>> windows programs "SplitView" and "Winsplit Revolution".
>>
>> For example I press W+Home and the active window is moved and resized
>> so it occupies the top left quadrant of the screen.
>>
>> I have done this by hard coding the window size based on the
>> dimensions of my screen. I have a 1920x1200 display so my key binding
>> resizes the window to a width of 960 and a height of 600.
>>
>> Now, what I would like to do is somehow tell openbox to use
>> screenwidth/2 and screenheight/2 so moving to a different screen or
>> resolution would not require the keybindings to be changed.
>>
>> I can't see anything in the documentation to indicate that this is
>> supported. If it is then great, but if not would it be the kind of
>> thing that might be considered as an enhancement request ?
>
> I want the same thing, but some people cope by replacing openbox with a
> script that first computes an rc.xml and then starts openbox.

The problem is before you know it, you have an arithmetic interpreter and 
kitchen sink in the config parser, and then people want to be able to say 
screen_size/3 + 5 - if today is thursday: 3. We have "center" for now, but 
nothing more. I guess the simplest and most useful thing we could do that 
doesn't mess things up is allow you to say 53.42% or so?

--
Mikael Magnusson


More information about the openbox mailing list