forge
Explore
Log in

Don't you dare go Hollow

wiki: Document per-output and per-workspace layout overrides

Browse files at this commit

264289cd41069bd2c85c523a1b0c687eab0a89d7Ivan MolodetskikhParent: f975672
docs/wiki/Configuration:-Layout.mdmodified+8 -1
@@ -29,6 +29,7 @@ layout {
2929
3030 focus-ring {
3131 // off
32+ on
3233 width 4
3334 active-color "#7fc8ff"
3435 inactive-color "#505050"
@@ -40,6 +41,7 @@ layout {
4041
4142 border {
4243 off
44+ // on
4345 width 4
4446 active-color "#ffc87f"
4547 inactive-color "#505050"
@@ -50,6 +52,7 @@ layout {
5052 }
5153
5254 shadow {
55+ off
5356 // on
5457 softness 30
5558 spread 5
@@ -61,6 +64,7 @@ layout {
6164
6265 tab-indicator {
6366 // off
67+ on
6468 hide-when-single-tab
6569 place-within-column
6670 gap 5
@@ -79,6 +83,7 @@ layout {
7983
8084 insert-hint {
8185 // off
86+ on
8287 color "#ffc87f80"
8388 // gradient from="#ffbb6680" to="#ffc88080" angle=45 relative-to="workspace-view"
8489 }
@@ -92,6 +97,8 @@ layout {
9297 }
9398 ```
9499
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+
95102 ### `gaps`
96103
97104 Set gaps around (inside and outside) windows in logical pixels.
@@ -550,4 +557,4 @@ layout {
550557 }
551558 ```
552559
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.
4545 <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).
4646 This means that named workspaces "stick" to their original output in more cases, reflecting their more permanent nature.
4747 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" {
1414 position x=1280 y=0
1515 variable-refresh-rate // on-demand=true
1616 focus-at-startup
17- background-color "#003300"
1817 backdrop-color "#001100"
1918
2019 hot-corners {
@@ -24,6 +23,10 @@ output "eDP-1" {
2423 // bottom-left
2524 // bottom-right
2625 }
26+
27+ layout {
28+ // ...layout settings for eDP-1...
29+ }
2730 }
2831
2932 output "HDMI-A-1" {
@@ -205,6 +208,8 @@ This is visible when you're not using any background tools like swaybg.
205208
206209 <sup>Until: 25.05</sup> The alpha channel for this color will be ignored.
207210
211+<sup>Since: next release</sup> This setting is deprecated, set `background-color` in the [output `layout {}` block](#layout-config-overrides) instead.
212+
208213 ```kdl
209214 output "HDMI-A-1" {
210215 background-color "#003300"
@@ -253,3 +258,55 @@ output "DP-2" {
253258 }
254259 }
255260 ```
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+```