diff --git a/docs/wiki/Configuration:-Layout.md b/docs/wiki/Configuration:-Layout.md index b3864f1c..32ff2289 100644 --- a/docs/wiki/Configuration:-Layout.md +++ b/docs/wiki/Configuration:-Layout.md @@ -29,6 +29,7 @@ layout { focus-ring { // off + on width 4 active-color "#7fc8ff" inactive-color "#505050" @@ -40,6 +41,7 @@ layout { border { off + // on width 4 active-color "#ffc87f" inactive-color "#505050" @@ -50,6 +52,7 @@ layout { } shadow { + off // on softness 30 spread 5 @@ -61,6 +64,7 @@ layout { tab-indicator { // off + on hide-when-single-tab place-within-column gap 5 @@ -79,6 +83,7 @@ layout { insert-hint { // off + on color "#ffc87f80" // gradient from="#ffbb6680" to="#ffc88080" angle=45 relative-to="workspace-view" } @@ -92,6 +97,8 @@ layout { } ``` +Since: next release You can override these settings for specific [outputs](./Configuration:-Outputs.md#layout-config-overrides) and [named workspaces](./Configuration:-Named-Workspaces.md#layout-config-overrides). + ### `gaps` Set gaps around (inside and outside) windows in logical pixels. @@ -550,4 +557,4 @@ layout { } ``` -You can also set the color per-output [in the output config](./Configuration:-Outputs.md#background-color). +You can also set the color per-output [in the output config](./Configuration:-Outputs.md#layout-config-overrides). diff --git a/docs/wiki/Configuration:-Named-Workspaces.md b/docs/wiki/Configuration:-Named-Workspaces.md index 8e87967c..81b270c6 100644 --- a/docs/wiki/Configuration:-Named-Workspaces.md +++ b/docs/wiki/Configuration:-Named-Workspaces.md @@ -45,3 +45,53 @@ Before, it could only use the connector name. Since: 25.02 Named workspaces no longer update/forget their original output when opening a new window on them (unnamed workspaces will keep doing that). This means that named workspaces "stick" to their original output in more cases, reflecting their more permanent nature. Explicitly moving a named workspace to a different monitor will still update its original output. + +### Layout config overrides + +Since: next release + +You can customize layout settings for named workspaces with a `layout {}` block: + +```kdl +workspace "aesthetic" { + // Layout config overrides just for this named workspace. + layout { + gaps 32 + + struts { + left 64 + right 64 + bottom 64 + top 64 + } + + border { + on + width 4 + } + + // ...any other setting. + } +} +``` + +It accepts all the same options as [the top-level `layout {}` block](./Configuration:-Layout.md), except: + +- `empty-workspace-above-first`: this is an output-level setting, doesn't make sense on a workspace. +- `insert-hint`: currently we always draw these at the output level, so it's not customizable per-workspace. + +In order to unset a flag, write it with `false`, e.g.: + +```kdl +layout { + // Enabled globally. + always-center-single-column +} + +workspace "uncentered" { + layout { + // Unset on this workspace. + always-center-single-column false + } +} +``` diff --git a/docs/wiki/Configuration:-Outputs.md b/docs/wiki/Configuration:-Outputs.md index a84a068f..b2b394bd 100644 --- a/docs/wiki/Configuration:-Outputs.md +++ b/docs/wiki/Configuration:-Outputs.md @@ -14,7 +14,6 @@ output "eDP-1" { position x=1280 y=0 variable-refresh-rate // on-demand=true focus-at-startup - background-color "#003300" backdrop-color "#001100" hot-corners { @@ -24,6 +23,10 @@ output "eDP-1" { // bottom-left // bottom-right } + + layout { + // ...layout settings for eDP-1... + } } output "HDMI-A-1" { @@ -205,6 +208,8 @@ This is visible when you're not using any background tools like swaybg. Until: 25.05 The alpha channel for this color will be ignored. +Since: next release This setting is deprecated, set `background-color` in the [output `layout {}` block](#layout-config-overrides) instead. + ```kdl output "HDMI-A-1" { background-color "#003300" @@ -253,3 +258,55 @@ output "DP-2" { } } ``` + +### Layout config overrides + +Since: next release + +You can customize layout settings for an output with a `layout {}` block: + +```kdl +output "SomeCompany VerticalMonitor 1234" { + transform "90" + + // Layout config overrides just for this output. + layout { + default-column-width { proportion 1.0; } + + // ...any other setting. + } +} + +output "SomeCompany UltrawideMonitor 1234" { + // Narrower proportions and more presets for an ultrawide. + layout { + default-column-width { proportion 0.25; } + + preset-column-widths { + proportion 0.2 + proportion 0.25 + proportion 0.5 + proportion 0.75 + proportion 0.8 + } + } +} +``` + +It accepts all the same options as [the top-level `layout {}` block](./Configuration:-Layout.md). + +In order to unset a flag, write it with `false`, e.g.: + +```kdl +layout { + // Enabled globally. + always-center-single-column +} + +output "eDP-1" { + layout { + // Unset on this output. + always-center-single-column false + } +} +```