From 723870337f299d4c80aa0048144f3a1ca1c885bd Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 21 Feb 2026 21:30:39 +0000 Subject: layout: rethonk layouts from the ground up (#12890) Rewrites layouts to be much smaller, and deal with much less annoying BS. Improves the overall architecture, unifies handling of pseudotiling, and various other improvements. --- src/config/ConfigDescriptions.hpp | 75 ++++++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 12 deletions(-) (limited to 'src/config/ConfigDescriptions.hpp') diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp index 80cd1182..ebe13156 100644 --- a/src/config/ConfigDescriptions.hpp +++ b/src/config/ConfigDescriptions.hpp @@ -1867,6 +1867,22 @@ inline static const std::vector CONFIG_OPTIONS = { .data = SConfigOptionDescription::SBoolData{false}, }, + /* + * layout: + */ + SConfigOptionDescription{ + .value = "layout:single_window_aspect_ratio", + .description = "If specified, whenever only a single window is open, it will be coerced into the specified aspect ratio. Ignored if the y-value is zero.", + .type = CONFIG_OPTION_VECTOR, + .data = SConfigOptionDescription::SVectorData{{0, 0}, {0, 0}, {1000., 1000.}}, + }, + SConfigOptionDescription{ + .value = "layout:single_window_aspect_ratio_tolerance", + .description = "Minimum distance for single_window_aspect_ratio to take effect, in fractions of the monitor's size.", + .type = CONFIG_OPTION_FLOAT, + .data = SConfigOptionDescription::SFloatData{0.1f, 0.f, 1.f}, + }, + /* * dwindle: */ @@ -1946,18 +1962,6 @@ inline static const std::vector CONFIG_OPTIONS = { .type = CONFIG_OPTION_BOOL, .data = SConfigOptionDescription::SBoolData{false}, }, - SConfigOptionDescription{ - .value = "dwindle:single_window_aspect_ratio", - .description = "If specified, whenever only a single window is open, it will be coerced into the specified aspect ratio. Ignored if the y-value is zero.", - .type = CONFIG_OPTION_VECTOR, - .data = SConfigOptionDescription::SVectorData{{0, 0}, {0, 0}, {1000., 1000.}}, - }, - SConfigOptionDescription{ - .value = "dwindle:single_window_aspect_ratio_tolerance", - .description = "Minimum distance for single_window_aspect_ratio to take effect, in fractions of the monitor's size.", - .type = CONFIG_OPTION_FLOAT, - .data = SConfigOptionDescription::SFloatData{0.1f, 0.f, 1.f}, - }, /* * master: @@ -2043,6 +2047,53 @@ inline static const std::vector CONFIG_OPTIONS = { .data = SConfigOptionDescription::SBoolData{false}, }, + /* + * scrolling: + */ + + SConfigOptionDescription{ + .value = "scrolling:fullscreen_on_one_column", + .description = "when enabled, a single column on a workspace will always span the entire screen.", + .type = CONFIG_OPTION_BOOL, + .data = SConfigOptionDescription::SBoolData{true}, + }, + SConfigOptionDescription{ + .value = "scrolling:column_width", + .description = "the default width of a column, [0.1 - 1.0].", + .type = CONFIG_OPTION_FLOAT, + .data = SConfigOptionDescription::SFloatData{.value = 0.5, .min = 0.1, .max = 1.0}, + }, + SConfigOptionDescription{ + .value = "scrolling:focus_fit_method", + .description = "When a column is focused, what method should be used to bring it into view", + .type = CONFIG_OPTION_CHOICE, + .data = SConfigOptionDescription::SChoiceData{.firstIndex = 0, .choices = "center,fit"}, + }, + SConfigOptionDescription{ + .value = "scrolling:follow_focus", + .description = "when a window is focused, should the layout move to bring it into view automatically", + .type = CONFIG_OPTION_BOOL, + .data = SConfigOptionDescription::SBoolData{.value = true}, + }, + SConfigOptionDescription{ + .value = "scrolling:follow_min_visible", + .description = "when a window is focused, require that at least a given fraction of it is visible for focus to follow", + .type = CONFIG_OPTION_FLOAT, + .data = SConfigOptionDescription::SFloatData{.value = 0.4, .min = 0.0, .max = 1.0}, + }, + SConfigOptionDescription{ + .value = "scrolling:explicit_column_widths", + .description = "A comma-separated list of preconfigured widths for colresize +conf/-conf", + .type = CONFIG_OPTION_STRING_SHORT, + .data = SConfigOptionDescription::SStringData{"0.333, 0.5, 0.667, 1.0"}, + }, + SConfigOptionDescription{ + .value = "scrolling:direction", + .description = "Direction in which new windows appear and the layout scrolls", + .type = CONFIG_OPTION_CHOICE, + .data = SConfigOptionDescription::SChoiceData{.firstIndex = 0, .choices = "right,left,down,up"}, + }, + /* * Quirks */ -- cgit v1.2.3