wiki: Document per-output and per-workspace layout overrides
Browse files at this commit264289cd41069bd2c85c523a1b0c687eab0a89d7Parent: f9756723 changed files +116 -2
- docs/wiki/Configuration:-Layout.md +8 -1
- docs/wiki/Configuration:-Named-Workspaces.md +50 -0
- docs/wiki/Configuration:-Outputs.md +58 -1
docs/wiki/Configuration:-Layout.mdmodified+8 -1
| @@ -29,6 +29,7 @@ layout { | ||
| 29 | 29 | |
| 30 | 30 | focus-ring { |
| 31 | 31 | // off |
| 32 | + on | |
| 32 | 33 | width 4 |
| 33 | 34 | active-color "#7fc8ff" |
| 34 | 35 | inactive-color "#505050" |
| @@ -40,6 +41,7 @@ layout { | ||
| 40 | 41 | |
| 41 | 42 | border { |
| 42 | 43 | off |
| 44 | + // on | |
| 43 | 45 | width 4 |
| 44 | 46 | active-color "#ffc87f" |
| 45 | 47 | inactive-color "#505050" |
| @@ -50,6 +52,7 @@ layout { | ||
| 50 | 52 | } |
| 51 | 53 | |
| 52 | 54 | shadow { |
| 55 | + off | |
| 53 | 56 | // on |
| 54 | 57 | softness 30 |
| 55 | 58 | spread 5 |
| @@ -61,6 +64,7 @@ layout { | ||
| 61 | 64 | |
| 62 | 65 | tab-indicator { |
| 63 | 66 | // off |
| 67 | + on | |
| 64 | 68 | hide-when-single-tab |
| 65 | 69 | place-within-column |
| 66 | 70 | gap 5 |
| @@ -79,6 +83,7 @@ layout { | ||
| 79 | 83 | |
| 80 | 84 | insert-hint { |
| 81 | 85 | // off |
| 86 | + on | |
| 82 | 87 | color "#ffc87f80" |
| 83 | 88 | // gradient from="#ffbb6680" to="#ffc88080" angle=45 relative-to="workspace-view" |
| 84 | 89 | } |
| @@ -92,6 +97,8 @@ layout { | ||
| 92 | 97 | } |
| 93 | 98 | ``` |
| 94 | 99 | |
| 100 | +<sup>Since: next release</sup> You can override these settings for specific [outputs](./Configuration:-Outputs.md#layout-config-overrides) and [named workspaces](./Configuration:-Named-Workspaces.md#layout-config-overrides). | |
| 101 | + | |
| 95 | 102 | ### `gaps` |
| 96 | 103 | |
| 97 | 104 | Set gaps around (inside and outside) windows in logical pixels. |
| @@ -550,4 +557,4 @@ layout { | ||
| 550 | 557 | } |
| 551 | 558 | ``` |
| 552 | 559 | |
| 553 | -You can also set the color per-output [in the output config](./Configuration:-Outputs.md#background-color). | |
| 560 | +You can also set the color per-output [in the output config](./Configuration:-Outputs.md#layout-config-overrides). |
docs/wiki/Configuration:-Named-Workspaces.mdmodified+50 -0
| @@ -45,3 +45,53 @@ Before, it could only use the connector name. | ||
| 45 | 45 | <sup>Since: 25.02</sup> Named workspaces no longer update/forget their original output when opening a new window on them (unnamed workspaces will keep doing that). |
| 46 | 46 | This means that named workspaces "stick" to their original output in more cases, reflecting their more permanent nature. |
| 47 | 47 | Explicitly moving a named workspace to a different monitor will still update its original output. |
| 48 | + | |
| 49 | +### Layout config overrides | |
| 50 | + | |
| 51 | +<sup>Since: next release</sup> | |
| 52 | + | |
| 53 | +You can customize layout settings for named workspaces with a `layout {}` block: | |
| 54 | + | |
| 55 | +```kdl | |
| 56 | +workspace "aesthetic" { | |
| 57 | + // Layout config overrides just for this named workspace. | |
| 58 | + layout { | |
| 59 | + gaps 32 | |
| 60 | + | |
| 61 | + struts { | |
| 62 | + left 64 | |
| 63 | + right 64 | |
| 64 | + bottom 64 | |
| 65 | + top 64 | |
| 66 | + } | |
| 67 | + | |
| 68 | + border { | |
| 69 | + on | |
| 70 | + width 4 | |
| 71 | + } | |
| 72 | + | |
| 73 | + // ...any other setting. | |
| 74 | + } | |
| 75 | +} | |
| 76 | +``` | |
| 77 | + | |
| 78 | +It accepts all the same options as [the top-level `layout {}` block](./Configuration:-Layout.md), except: | |
| 79 | + | |
| 80 | +- `empty-workspace-above-first`: this is an output-level setting, doesn't make sense on a workspace. | |
| 81 | +- `insert-hint`: currently we always draw these at the output level, so it's not customizable per-workspace. | |
| 82 | + | |
| 83 | +In order to unset a flag, write it with `false`, e.g.: | |
| 84 | + | |
| 85 | +```kdl | |
| 86 | +layout { | |
| 87 | + // Enabled globally. | |
| 88 | + always-center-single-column | |
| 89 | +} | |
| 90 | + | |
| 91 | +workspace "uncentered" { | |
| 92 | + layout { | |
| 93 | + // Unset on this workspace. | |
| 94 | + always-center-single-column false | |
| 95 | + } | |
| 96 | +} | |
| 97 | +``` |
docs/wiki/Configuration:-Outputs.mdmodified+58 -1
| @@ -14,7 +14,6 @@ output "eDP-1" { | ||
| 14 | 14 | position x=1280 y=0 |
| 15 | 15 | variable-refresh-rate // on-demand=true |
| 16 | 16 | focus-at-startup |
| 17 | - background-color "#003300" | |
| 18 | 17 | backdrop-color "#001100" |
| 19 | 18 | |
| 20 | 19 | hot-corners { |
| @@ -24,6 +23,10 @@ output "eDP-1" { | ||
| 24 | 23 | // bottom-left |
| 25 | 24 | // bottom-right |
| 26 | 25 | } |
| 26 | + | |
| 27 | + layout { | |
| 28 | + // ...layout settings for eDP-1... | |
| 29 | + } | |
| 27 | 30 | } |
| 28 | 31 | |
| 29 | 32 | output "HDMI-A-1" { |
| @@ -205,6 +208,8 @@ This is visible when you're not using any background tools like swaybg. | ||
| 205 | 208 | |
| 206 | 209 | <sup>Until: 25.05</sup> The alpha channel for this color will be ignored. |
| 207 | 210 | |
| 211 | +<sup>Since: next release</sup> This setting is deprecated, set `background-color` in the [output `layout {}` block](#layout-config-overrides) instead. | |
| 212 | + | |
| 208 | 213 | ```kdl |
| 209 | 214 | output "HDMI-A-1" { |
| 210 | 215 | background-color "#003300" |
| @@ -253,3 +258,55 @@ output "DP-2" { | ||
| 253 | 258 | } |
| 254 | 259 | } |
| 255 | 260 | ``` |
| 261 | + | |
| 262 | +### Layout config overrides | |
| 263 | + | |
| 264 | +<sup>Since: next release</sup> | |
| 265 | + | |
| 266 | +You can customize layout settings for an output with a `layout {}` block: | |
| 267 | + | |
| 268 | +```kdl | |
| 269 | +output "SomeCompany VerticalMonitor 1234" { | |
| 270 | + transform "90" | |
| 271 | + | |
| 272 | + // Layout config overrides just for this output. | |
| 273 | + layout { | |
| 274 | + default-column-width { proportion 1.0; } | |
| 275 | + | |
| 276 | + // ...any other setting. | |
| 277 | + } | |
| 278 | +} | |
| 279 | + | |
| 280 | +output "SomeCompany UltrawideMonitor 1234" { | |
| 281 | + // Narrower proportions and more presets for an ultrawide. | |
| 282 | + layout { | |
| 283 | + default-column-width { proportion 0.25; } | |
| 284 | + | |
| 285 | + preset-column-widths { | |
| 286 | + proportion 0.2 | |
| 287 | + proportion 0.25 | |
| 288 | + proportion 0.5 | |
| 289 | + proportion 0.75 | |
| 290 | + proportion 0.8 | |
| 291 | + } | |
| 292 | + } | |
| 293 | +} | |
| 294 | +``` | |
| 295 | + | |
| 296 | +It accepts all the same options as [the top-level `layout {}` block](./Configuration:-Layout.md). | |
| 297 | + | |
| 298 | +In order to unset a flag, write it with `false`, e.g.: | |
| 299 | + | |
| 300 | +```kdl | |
| 301 | +layout { | |
| 302 | + // Enabled globally. | |
| 303 | + always-center-single-column | |
| 304 | +} | |
| 305 | + | |
| 306 | +output "eDP-1" { | |
| 307 | + layout { | |
| 308 | + // Unset on this output. | |
| 309 | + always-center-single-column false | |
| 310 | + } | |
| 311 | +} | |
| 312 | +``` |