Menu

#132 Tiling & TrueTiling

open
nobody
None
5
2013-02-10
2008-05-31
No

Tiling & TrueTiling patch 0.1

This is actually the merge of two previous patches of mine concerning tiling and maximization:
:Tile and :Collide keycommand checks for others windows borders without considering the z-order (windows that are fully or partially hided by others);
while :TTile creates a map of all unused spaces in the desktop and chooses the better target for moving/resizing the focused window

So this patch adds 4 keycommands:

:Tile <UP|DOWN|RIGHT|LEFT><EXPAND><SPACE,SPACEUP,SPACEDOWN,SPACERIGHT,SPACELEFT pixels>: for each given side of the focused window the command will find the nearer other apps's border in the same desktop and resize the window consequently. This cause the window to fit the nearest empty area between other windows in the desktop.
Further calls the the command will cause the window to expand over adjacent windows. If no direction param is provided the tiling happens for all the four sides.With the EXPAND parameter the search for the nearest border will consider only positive distances. This will cause the window to always enlarge itself. SPACE param and SPACEdirection params grants that a space around the window will be left

:Collide <UP|DOWN|RIGHT|LEFT><SPACE pixels>: moves the current window in the given direction until it reaches another window side or the desktop border. If SPACE param is provided a space sized *pixel* between the windows will be left.

:TTile AREA n NEAR n SQUARE n SPACE n MINWIDTH n MINHEIGHT n: It search in the current desktop the empty areas uncovered by windows and choose a target rectangle where placing the current focused window. With the params AREA, NEAR and SQUARE you can influence the sorting of the targets: you can give to each of them a value in the range 0-100.
AREA : bigger empty rectangles will be choosen
NEAR : nearest empyt rectabgles will be choosen
SQUARE : rectangles with the with/height ratio closer to 1 will be choosen
you can use any combination of the three params
MINWIDTH and MINHEIGHT assure that the target choosed won't be smaller than theese dimensions
SPACE leave an empty border of tot pixels around the tiled window

:ResizeToPrevious: allows you to undo all the resizing steps done with Tile or the others Maximize commands.

Keys entry examples

Mod4 Shift Up :Collide UP SPACE 10
Mod4 Shift Down :Collide DOWN SPACE 10
Mod4 Shift Right :Collide RIGHT SPACE 10
Mod4 Shift Left :Collide LEFT SPACE 10

Mod4 v :Tile UP DOWN SPACE 10
Mod4 Shift v :Tile UP DOWN
Mod4 h :Tile RIGHT LEFT SPACE 10
Mod4 Shift h :Tile RIGHT LEFT
Mod4 m :Tile SPACE 10
Mod4 Shift m :Tile

Mod4 n :ResizeToPrevious

Mod4 t :ttile AREA 80 NEAR SQUARE 80 SPACE 20 MINWIDTH 200 MINHEIGHT 200

Discussion

  • Mark Tiefenbruck

    Logged In: YES
    user_id=1538990
    Originator: NO

    You know, the more and more things you stuff into a patch, the less and less likely it is to be accepted. Here are things that I will accept:

    A patch for general window move/resize undo/redo. I have thoughts on how this should be implemented; you can ask me in -dev.

    A patch to move/resize to the next edge. Up/Right/Left/Down are fine. For resize, you should be able to specify which edge to move.

    A patch for expanding in the current area. I'm concerned about the algorithm, so you should discuss this with me in -dev. It's fine for this to depend on or be included with the previous patch.

    A patch to re-place a window according to the user's placement strategy.

    Don't include extra options (without my approval). Don't use short names that don't adequately describe what the command does.

     
  • matteo galiazzo

    matteo galiazzo - 2008-06-04

    Logged In: YES
    user_id=697338
    Originator: YES

    0.2 suitable for gcc 4.3 (thanks to jan geboers)
    File Added: AllTiling.0.2.patch

     
  • matteo galiazzo

    matteo galiazzo - 2008-08-24

    Logged In: YES
    user_id=697338
    Originator: YES

    merged against git version 7d2240e2ced51fc30b890df299b616471cabee20 Sat Aug 23 17:36:55 2008 -0700

     
  • matteo galiazzo

    matteo galiazzo - 2008-08-24

    Logged In: YES
    user_id=697338
    Originator: YES

    patch against git version 7d2240e2ced51fc30b890df299b616471cabee20

     
  • matteo galiazzo

    matteo galiazzo - 2008-08-24

    Logged In: YES
    user_id=697338
    Originator: YES

    patch against git version 7d2240e2ced51fc30b890df299b616471cabee20 Sat Aug 23 17:36:55 2008 -0700

     
  • matteo galiazzo

    matteo galiazzo - 2008-08-24

    Logged In: YES
    user_id=697338
    Originator: YES

    patch against git version 7d2240e2ced51fc30b890df299b616471cabee20 (third attempt)

     
  • matteo galiazzo

    matteo galiazzo - 2008-08-24

    Logged In: YES
    user_id=697338
    Originator: YES

    patch against git version 7d2240e2ced51fc30b890df299b616471cabee20 (fourth
    attempt)

     
  • matteo galiazzo

    matteo galiazzo - 2008-08-25

    Logged In: YES
    user_id=697338
    Originator: YES

    patch against git version 7d2240e2ced51fc30b890df299b616471cabee20
    (fifth
    attempt)

     
  • matteo galiazzo

    matteo galiazzo - 2008-08-30

    Logged In: YES
    user_id=697338
    Originator: YES

    um, let's see if after some days they fixed the upload problem...
    File Added: AllTiling.0.5.patch

     
  • matteo galiazzo

    matteo galiazzo - 2008-08-30

    patch against git version 920cb81caf2b3b86ad91f9a7290f73

     
  • Nobody/Anonymous

    I've been using :Tile and :Collide commands for a few months.
    I can't imagine how to work without them. Thanks!

     

Log in to post a comment.