Custom Grids :: Toggling or cycling front window size and position Macros (v11.0.2)

Custom Grids :: Toggling or cycling front window size and position Macros (v11.0.2)

A cluster of window-management macros which share the same subroutines.

You can define your own custom grids and cycles using a brief textual notation. (See below)

WINDOW TILING CYCLES : Toggling or cycling front window size and position Macros.kmmacros (146,5 Ko)

4 Likes

Updated above:

Expanded set of possible window tile toggles and cycles by basing next frame on previous trigger and cycle index, rather than on current X Y position.

⌥⌘2 now alternates between vertical and horizontal screen splits
⌥⌘5 now adds a third position to the cycle (half screen, horizontally centred)

Notation for custom grids

To create a custom window tiling toggle or cycle, copy one of the macros above,
and edit the value of local_CycleNotation

For example, a clockwise rotation, cycling each time the macro is run, through the four quadrants of the screen, would be:

1,2
4,3
  • commas delimit grid columns
  • lines endings delimit rows
  • numbers give the sequence in which the front window moves on each use of the macro

For anti clockwise window movements through screen quadrants:

1,4
2,3

Tiles left un-numbered are not visited. Here we divide the screen into nine tiles, but only move the window down the three left edge tiles, and then up the three right edge tiles, avoiding the middle of the screen:

1,,6
2,,5
3,,4

In addition to window-move sequencing numbers, we can optionally add another note after a space, giving width (w) or height (h) dimensions for a window in number of grid tiles.

e.g.

  • Double width for the third stage of the cycle: 3 2w
  • or triple height for the first stage of the cycle 1 3h

The following shows windows which are each half of the screen width, but uses four positioning columns, so that we can have a centred half-screen window, in addition to full left and full right:

1 2w,2 2w,3 2w,

Finally, for more complex cycles, you can use a three-character markdown horizontal rule (like *** or ---) to add a further cycle path.

Here we alternate between the left 2/3 of the screen and the right 2/3:

1 2w,,
---
,2 2w,

While this four step cycle:

1,,
2,,
3,,
---
,4 2w 3h
  • First moves a 1/9 tile down the left edge of the screen, in three steps
  • then, for its fourth window position, takes up the whole right hand 2/3 of the screen – two column widths (2w) of three rows (3h) of the 3 * 3 grid.

As a last example, this four step cycle:

1 2h,2 2h
---
3 2w
4 2w

Places the front window at:

  • the left of the screen
  • the right of the screen, and then
  • the top half of the screen
  • the bottom half of the screen

( Extra commas can be skipped where w and h sizes already imply a larger grid )

Updated (above) to add four ( left right up down ) macros for moving a window directly within the most recently used grid.

( Where the grid is defined by one of the custom window-toggling or window-cycling macros)

For a macro which:

  • Moves the front window to the next quadrant, clockwise, each time it is triggered, and then finally
  • (move 5) centres the quarter-screen window (before restarting the quadrant cycle)

you could write:

1 2w 2h,  		,2 2w 2h,
		,5 2w 2h,      	,
4 2w 2h,  		,3 2w 2h,
,            ,  		,

(Requires the subroutines posted above)

QUADRANTS clockwise- then centered - front window tiles.kmmacros (2.7 KB)