[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbox
Subject:    [openbox] Windows Positioning
From:       rephorm () rephorm ! com (rephorm)
Date:       2013-01-14 7:27:15
Message-ID: 557B41C5-D925-4E4F-8A70-F5774E74F642 () rephorm ! com
[Download RAW message or body]

The script that I sent uses xprop to store the previous coordinates as an x11 \
property on the window itself. The memory is located in the X server process, and can \
be accessed using xprop (or the corresponding API calls from any client).

Brian

On Jan 13, 2013, at 9:12 AM, laertis <loutsis at csd.uoc.gr> wrote:

> Ok, hello again.
> 
> in reply to the last message this is my current configuration but what this lacks \
> is the comfort of being able to split your screen in half with whichever window you \
> want to, and then restore that window back to its orginal (custom) size. 
> Unfortunately i didn't have the time i expected to have to finish writing the \
> script but what troubles me the most is how am i going to be able to apply this \
> script for every window in my desktop. A separate instance of a script should run \
> for its window with its own memory which is going to hold the windows previous \
> coordinates and size, at least in the way i have thought about it. 
> 
> On Thu, Jan 3, 2013 at 12:08 AM, Das <dasfox at gmail.com> wrote:
> Now that I think about this, why can't it simply be a TILE action for a few \
> windows? Seems simple enough to get the job done, yes, no? 
> How about this link?
> 
> http://urukrama.wordpress.com/2011/10/30/manual-tiling-in-openbox/
> 
> 
> THANKS
> 
> 
> 
> 
> On Wed, Jan 2, 2013 at 8:53 AM, Brian Mattern <rephorm at rephorm.com> wrote:
> Sorry, that was an incomplete email that I didn't mean to send...
> The xprop formats need to be large (like 32i)
> 
> I have attached a script that gets mostly there, but it looks like there
> are some issues if you have <margins> set in your rc.xml. And, it
> doesn't play well with xinerama...
> 
> Anyway, it gets the idea across, at least. (I don't have any more time
> to play with it today).
> 
> Brian
> 
> On Wed, 02 Jan 2013, Brian Mattern wrote:
> 
> > 
> > The "MoveResizeTo" action that is described in laertis' original email
> > should work for getting the window onto the left half of the screen (and
> > a similar one for the right half wouldn't be too hard to write).
> > Although he doesn't say explicitly, it sounds like his concern was about
> > the problem of undoing the behavior. In Win7, IIRC, when you drag away from
> > the edge, the window returns to its original size (while its position is
> > determined by the drag). This would not be possible with openbox actions
> > directly since you can't store the state.
> > 
> > But, it shouldn't be hard to do in a WM agnostic way using something
> > like xdotool and bash.
> > 
> > e.g.:
> > 
> > # get active window's id and geometry (this sets vars WINDOW X Y
> > # WIDTH HEIGHT and SCREEN)
> > eval $(xdotool getactivewindow getwindowgeometry --shell)
> > 
> > # store current geometry as properties
> > xprop -id $WINDOW -format _FOO_PREVIOUS_X 8i -set _FOO_PREVIOUS_X $X
> > xprop -id $WINDOW -format _FOO_PREVIOUS_Y 8i -set _FOO_PREVIOUS_Y $Y
> > 
> > On Tue, 01 Jan 2013, Das wrote:
> > 
> > > Hi guys,
> > > 
> > > Did anyone see this, can this be done?
> > > 
> > > THANKS
> > > 
> > > 
> > > On Tue, Dec 18, 2012 at 2:35 PM, Das <dasfox at gmail.com> wrote:
> > > 
> > > > Ahhh snap a Window to the left then snap a Window to the right, having
> > > > them side by side like Windows 7, hmm I never thought about this
> > > > before...
> > > > 
> > > > So are we saying this is do able? This would be a nice feature...
> > > > 
> > > > 
> > > > 
> > > > On Tue, Dec 18, 2012 at 9:43 AM, Mathias Dufresne
> > > > <mathias.dufresne at gmail.com> wrote:
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > You can use middle mouse button to resize vertically and right button to
> > > > > resize window horizontally in place of left button which resize in full
> > > > > screen...
> > > > > It almost remember previous position even if sometimes I had strange
> > > > > behaviour when clicking to get back to previous state. No idea if it was
> > > > old
> > > > > version, my mistake or whatever... Anyway, I use that for years and that
> > > > > miss me so much under Windows...
> > > > > 
> > > > > That does not answer to your question but perhaps it would help : )
> > > > > 
> > > > > Cheers,
> > > > > 
> > > > > Mat
> > > > > 
> > > > > 
> > > > > 2012/12/18 laertis <loutsis at csd.uoc.gr>
> > > > > > 
> > > > > > Hello,
> > > > > > 
> > > > > > first of all i'd like to say how much i love this WM and how
> > > > configurable
> > > > > > it is.
> > > > > > 
> > > > > > What is troubling me for the past of the week is how to get openbox to
> > > > > > simulate Win7 aero snapping behavior which i find really comforting and
> > > > > > productive btw. I assumed that in order to achieve so, given the current
> > > > > > configuration actions, i would need to know the variables holding the
> > > > > > window's position so i could "MoveResizeTo" those!
> > > > > > 
> > > > > > I think this guy describes the same thing with me except that he is
> > > > > > talking about mousebinds while i'm talking about keybinds.
> > > > > > 
> > > > > > 
> > > > > > And this is the nearest i could get to Win7 snapping :
> > > > > > http://www.jasoncavett.com/2012/05/better-aero-snap-with-openbox.html
> > > > > > 
> > > > > > I've tried a work around leveraging the if statements of the openbox
> > > > > > configuration file and the result was something like this :
> > > > > > 
> > > > > > <keybind key='W-Right">
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <action name="If">
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <maximized>yes</maximized>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <then>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <action name="Unmaximize"/>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <action name="Unmaximize"/>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <direction>vertical</direction>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > </action>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <action name="MoveResizeTo">
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <x>0</x>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <y>0</y>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <width>50%</width>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > </action>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > </then>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <else>
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <action name="If">
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > ..........
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > ..........
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > ..........
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > ..........
> > > > > > 
> > > > > > but i figured out but it can't be done without knowing the window's
> > > > > > position.
> > > > > > 
> > > > > > So i think writing a wmctrl script holding the windows position and
> > > > > > combining it with the above would give me what i want.
> > > > > > 
> > > > > > Is there any chance this is implemented somewhere out there?
> > > > > > 
> > > > > > I think i'm gonna write down a script either way but if there is
> > > > > > something out there getting the job done it would help for now.
> > > > > > 
> > > > > > However there are some issues i'm thinking right now, such as, how is
> > > > > > each windows going to hold it's previous state ?
> > > > > > 
> > > > > > Anyway, that's about it. Thank you for the support.
> > > > > > 
> > > > > > 
> > > > > > _______________________________________________
> > > > > > 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
> > > > > 
> > > > 
> > 
> > > _______________________________________________
> > > 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
> 
> _______________________________________________
> 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
> 
> 
> _______________________________________________
> 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/20130113/f1a64e21/attachment.htm>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic