bakkeby/patches

No Option to Set Mirror Layout As The Default in Flextile Delux

VehementHam opened this issue · 3 comments

There is an option to set the mirror layout to a keybind. There is no option to set the mirror layout as the default layout as far as I can tell.

What should happen is that when I set the value to 1 like this:

{ MODKEY|ControlMask,           XK_Return, mirrorlayout,   {1} },           /* flextile, flip master and stack areas */

It should become the default.

That is not so obvious. Whether the layout is mirrored or not is determined by a positive or negative split.

Take the following default configuration for the tile layout as an example. Here we have a vertical split.

	/* symbol     arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis } */
	{ "[]=",      flextile,         { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout

If you make that split negative, either by adding a minus sign -SPLIT_VERTICAL or multiplying by -1 (-1 * SPLIT_VERTICAL) then the layout should be mirrored by default.

	/* symbol     arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis } */
	{ "[]=",      flextile,         { -1, -1, -SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout

That worked, thank you. I do not exactly understand why though.