[openbox] What is the unit of the ResizeRelative actions?

Dana Jansens dana at orodu.net
Wed Jun 12 19:14:09 EDT 2013


On Wed, Jun 12, 2013 at 6:35 PM, Wujek Srujek <wujek.srujek at gmail.com>wrote:

> Hi. I have the following keybindings in my rc.xml:
>
> <keybind key="W-Escape" chroot="true">
>       <keybind key="Right">
>         <action name="ResizeRelative">
>           <right>50</right>
>         </action>
>       </keybind>
>       <!-- and similar for Left, Up and Down -->
> </keybind>
>
> I can't wrap my head around how this works. What is the unit that I
> specify? Is it pixels or % or maybe something else? At my computer a small
> window grows by 400 pixels in width:
>
> # the window is currently centralized
> $ wmctrl -lxG | tail -n 1
> 0x024012a3  0 393  276  655  377  lxterminal.Lxterminal
> # after ResizeRelative +50 right
> $ wmctrl -lxG | tail -n 1
> 0x024012a3  0 393  276  1055 377  lxterminal.Lxterminalt
>
> # centralize again
> $ wmctrl -lxG | tail -n 1
> 0x0240279c  0 393  276  655  377  lxterminal.Lxterminal
> # after ResizeRelative +50 left
> $ wmctrl -lxG | tail -n 1
> 0x0240279c  0 -7   276  1055 377  lxterminal.Lxterminal
>
> and by 750 pixels in height:
>
> # centralized
> $ wmctrl -lxG | tail -n 1
> 0x024028bb  0 393  276  655  377  lxterminal.Lxterminal
> # ResizeRelative +50 bottom
> rafal at studio ~ $ wmctrl -lxG | tail -n 1
> 0x024028bb  0 393  276  655  1127 lxterminal.Lxterminal
>
> # centralized
> $ wmctrl -lxG | tail -n 1
> 0x024029af  0 393  276  655  377  lxterminal.Lxterminal
> # ResizeRelative +50 top
> rafal at studio ~ $ wmctrl -lxG | tail -n 1
> 0x024029af  0 393  -474 655  1127 lxterminal.Lxterminal
>
> I have similar bindings binding for moving the window, also by 50
> somethings:
>
> <keybind key="A-W-Escape" chroot="true">
>       <keybind key="Right">
>         <action name="MoveRelative">
>           <x>50</x>
>         </action>
>       </keybind>
>       ...
> </keybind>
>
> and this does move the window by 50 pixels in each direction (I won't
> paste the wmctrl calls here, trust me on this one ;d).
> My resolution is 1440x900 and I am on:
>
> $ openbox --version
> Openbox 3.5.0
> ...
>
> What are the units that these parameters are specified in? And why are
> they inconsistent? Or is it just something with my setup and I am doing
> things wrong?
>

For a terminal application, it (usually) requests resizes in increments
relative to the font size. Openbox uses the resize increment amount
specified by an application as the resize unit here.

Applications like gedit, or chromium, would resize in pixels since they
don't specify an incremental size.


>
> wujek
>
> _______________________________________________
> 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/20130612/55a6fd8c/attachment.html>


More information about the openbox mailing list