Tiling window sizing
XFCE allows the option to add margins to the outside of the screen via the Workspace Settings (margins). However, in order to achieve the popular 'gaps', I was trying to figure out how to have windows that are tiled have the same margins. This would mean that if the outside margins are already changed, it would involve allowing the inner two lines (one widthwise, one horizontal) to also be changed.
I believe in the source code, under moveresize.c, there is the main piece of code possibly that tiles windows:
{
case CORNER_BOTTOM_LEFT:
px = frameExtentX (c) + frameExtentLeft(c) / 2;
py = frameExtentY (c) + frameExtentHeight (c) - frameExtentBottom(c) / 2;
break;
case CORNER_BOTTOM_RIGHT:
px = frameExtentX (c) + frameExtentWidth (c) - frameExtentRight(c) / 2;
py = frameExtentY (c) + frameExtentHeight (c) - frameExtentBottom(c) / 2;
break;
case CORNER_TOP_LEFT:
px = frameExtentX (c) + frameExtentLeft(c) / 2;
py = frameExtentY (c);
break;
case CORNER_TOP_RIGHT:
px = frameExtentX (c) + frameExtentWidth (c) - frameExtentRight(c) / 2;
py = frameExtentY (c);
break;
case CORNER_COUNT + SIDE_LEFT:
px = frameExtentX (c) + frameExtentLeft(c) / 2;
py = frameExtentY (c) + frameExtentHeight (c) / 2;
break;
case CORNER_COUNT + SIDE_RIGHT:
px = frameExtentX (c) + frameExtentWidth (c) - frameExtentRight(c) / 2;
py = frameExtentY (c) + frameExtentHeight (c) / 2;
break;
case CORNER_COUNT + SIDE_TOP:
px = frameExtentX (c) + frameExtentWidth (c) / 2;
py = frameExtentY (c);
break;
case CORNER_COUNT + SIDE_BOTTOM:
px = frameExtentX (c) + frameExtentWidth (c) / 2;
py = frameExtentY (c) + frameExtentHeight (c) - frameExtentBottom(c) / 2;
break;
default:
px = frameExtentX (c) + frameExtentWidth (c) / 2;
py = frameExtentY (c) + frameExtentHeight (c) / 2;
break;
}
Would it be possible to adjust these measurements to frameExtent[] (c) * 0.45, or something of the like, so that it could tile to a percent of the screen rather than a full half? I don't know where to find the code for the outer margin option in XFCE, but I can adjust them by pixel size, and so theoretically I feel like it should be possible to adjust the inner margins too, especially since you can still drag a window to the edge of the screen even with margin enabled.