You are not logged in.

#1 2009-08-27 11:49:26

kasbah
Member
Registered: 2009-08-13
Posts: 30

Openbox: Resize Window According To Resolution

Is it possible to use to resize windows according to the resolution of your screen in OpenBox3? What I want to do is make windows half the screen width with a shortcut. I can do this like this in rc.xml:

<keybind key="S-Right">
   <action name="UnmaximizeFull"/>
   <action name="MaximizeVert"/>
   <action name ="MoveResizeTo">
     <x> 720 </x>
     <y> 0 </y>
    <width> 720 </width>
  </action>
</keybind>

But I would like to make it more flexible and to set it to this without knowing how much half of my (1440x900) screen is (720).  Unfortunately resizing after setting MaximizeVert doesn't work which would be a step in the right direction.

Is there a way to resize a maximised window? Is there another way of doing this?

Offline

#2 2009-08-28 15:42:32

kasbah
Member
Registered: 2009-08-13
Posts: 30

Re: Openbox: Resize Window According To Resolution

Seems there is no way to do this yet although it should be possible since openbox knows what size to "maximise" your windows to.

Another question: is it possible to perform an action after pressing PART of a keychain? I.E. keybind an action to C-r say and then followed by another key to complete a keychain to perform a different action:

<keybind key"C-r">
  <action name="action 1"/> <!-- action when C-r is pressed -->
  <keybind key="e">
    <action name ="action 2"/> <!-- action when C-r then "e" is pressed --> 
  </keybind>
</keybind>

Offline

#3 2009-08-29 00:19:31

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: Openbox: Resize Window According To Resolution

You could probably write a small script for your first problem, using wmctrl. As for the second, why don't you just play with the configs and see? I'm guessing that if it is possible, it's not the way you put it, but probably <keybind key"C-r e"> or some such. Or openbox could be modified to act as such, probably.

Offline

#4 2009-09-24 20:52:07

kasbah
Member
Registered: 2009-08-13
Posts: 30

Re: Openbox: Resize Window According To Resolution

Thanks for the reply majiq.

I am now looking into using wmctrl or xdotool for the first one. I was quite happy with my solution as described but now I have dual monitors and it is not working as expected anymore.

I havn't tried it but I do not think <keybind "C-r e"> will work. What I did do is bind Seperate actions to C-r and C-e and make them behave as desired.

Offline

#5 2009-09-24 22:58:50

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Openbox: Resize Window According To Resolution

I'm really not sure but is there a way to tell openbox to use percentage rather than pixels?


neutral

Offline

#6 2010-05-15 18:43:11

fifafrazer
Member
Registered: 2008-02-18
Posts: 81

Re: Openbox: Resize Window According To Resolution

bump, Is percentage still not possible in openbox?

Offline

#7 2010-05-15 20:19:35

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: Openbox: Resize Window According To Resolution

Not to my knowledge.
But you can use applications like stiler or tile-windows to move windows to the left or right edge of the screen.
For instance "stiler right" would resize a window to fit half the screen and move it to the right side of the screen.

Last edited by demian (2010-05-15 20:21:49)


no place like /home
github

Offline

#8 2010-05-16 13:15:44

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Openbox: Resize Window According To Resolution

fifafrazer wrote:

bump, Is percentage still not possible in openbox?

A patch has been written and will be in the next version.

Offline

Board footer

Powered by FluxBB