On April 24, 2017 2:19:31 PM GMT+02:00, Okan Demirmen <[email protected]> wrote:
>On Wed 2017.04.12 at 10:38 +0200, Antoine Jacoutot wrote:
>> On Tue, Apr 11, 2017 at 06:00:21PM +0200, Gerrit Meyerheim wrote:
>> > Hi @tech,
>> > 
>> > The way cwm(1) currently implements tiling (off by default) is
>> > corresponding to this for vtile,
>> > 
>> > ---------------------------------
>> > |          |               |
>> > |          |       1       |
>> > |          |               |
>> > |  M       -----------------
>> > |          |               |
>> > |          |       2       |
>> > |          |               |
>> > ---------------------------------
>> > 
>> >  <------------->
>> >    w
>> > 
>> > where 'w' is the original horizontal size of the master client when
>> > vtile was invoked. The analogous is true for htile and vertical
>height.
>> > 
>> > While this approach gives the greatest flexibility (as one can
>define
>> > the size of the master area for each invocation of vtile) I most
>often
>> > find myself wanting the following behaviour when using tiling,
>> > 
>> > ---------------------------------
>> > |          |               |
>> > |          |       1       |
>> > |          |               |
>> > |  M       -----------------
>> > |          |               |
>> > |          |       2       |
>> > |          |               |
>> > ---------------------------------
>> > 
>> >  <------------->
>> >    w
>> > 
>> > where 'w' is "0.5 x horizontal widht of the screen" for vtile and
>the
>> > analogous for htile and height.
>> > 
>> > The attached patch tries to implement this (replacing the current
>> > approach). Of course, there would also be the possibility of having
>an
>> > additional function (e.g. client_htile_half etc.).
>> > 
>> > Thoughts?
>> 
>> I'd prefer that as well...
>> Not sure what the others think.
>
>Hi - I'm not a tiling user but after playing around, I find expanding
>the
>master client to 50% of the area more appeasing as well. I'd rather not
>create another function, unless enough people need it. Committed as-is.
>
>Thanks!
>Okan
>
>> 
>> > 
>> > Best
>> > 
>> > Gerrit
>> > 
>> > 
>> > Index: client.c
>> > ===================================================================
>> > RCS file: /cvs/xenocara/app/cwm/client.c,v
>> > retrieving revision 1.234
>> > diff -u -p -r1.234 client.c
>> > --- client.c       6 Feb 2017 18:10:28 -0000       1.234
>> > +++ client.c       10 Apr 2017 12:23:48 -0000
>> > @@ -982,6 +982,7 @@ client_htile(struct client_ctx *cc)
>> >    cc->flags &= ~CLIENT_HMAXIMIZED;
>> >    cc->geom.x = area.x;
>> >    cc->geom.y = area.y;
>> > +  cc->geom.h = (area.h - (cc->bwidth * 2)) / 2;
>> >    cc->geom.w = area.w - (cc->bwidth * 2);
>> >    client_resize(cc, 1);
>> >    client_ptrwarp(cc);
>> > @@ -1042,6 +1043,7 @@ client_vtile(struct client_ctx *cc)
>> >    cc->geom.x = area.x;
>> >    cc->geom.y = area.y;
>> >    cc->geom.h = area.h - (cc->bwidth * 2);
>> > +  cc->geom.w = (area.w - (cc->bwidth * 2)) / 2;
>> >    client_resize(cc, 1);
>> >    client_ptrwarp(cc);
>> >  
>> > Index: cwmrc.5
>> > ===================================================================
>> > RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v
>> > retrieving revision 1.66
>> > diff -u -p -r1.66 cwmrc.5
>> > --- cwmrc.5        15 Jan 2017 21:07:44 -0000      1.66
>> > +++ cwmrc.5        10 Apr 2017 12:23:48 -0000
>> > @@ -324,11 +324,13 @@ Vertically maximize current window (gap 
>> >  .It window-hmaximize
>> >  Horizontally maximize current window (gap + border honored).
>> >  .It window-htile
>> > -Current window is placed at the top of the screen and maximized
>> > -horizontally, other windows in its group share remaining screen
>space.
>> > +Current window is placed at the top of the screen, maximized
>> > +horizontally and resized to half of the vertical screen space.
>Other
>> > +windows in its group share remaining screen space.
>> >  .It window-vtile
>> > -Current window is placed on the left of the screen and maximized
>> > -vertically, other windows in its group share remaining screen
>space.
>> > +Current window is placed on the left of the screen, maximized
>vertically
>> > +and resized to half of the horizontal screen space. Other windows
>in its
>> > +group share remaining screen space.
>> >  .It window-move
>> >  Move current window.
>> >  .It window-resize
>> > 
>> 
>> -- 
>> Antoine
>> 

Awesome, thanks!
-- 
Antoine

Reply via email to