wiki: Improve Layout
Browse files at this commit470d65a06082370342fc50f458f1bdf90120669eParent: 4f421901 changed file +11 -4
wiki/Configuration:-Layout.mdmodified+11 -4
| @@ -1,6 +1,6 @@ | |||
| 1 | ### Overview | 1 | ### Overview |
| 2 | 2 | ||
| 3 | -In the `layout {}` section you can change various settings that influence how the windows are positioned and sized. | 3 | +In the `layout {}` section you can change various settings that influence how windows are positioned and sized. |
| 4 | 4 | ||
| 5 | Here are the contents of this section at a glance: | 5 | Here are the contents of this section at a glance: |
| 6 | 6 | ||
| @@ -91,6 +91,13 @@ layout { | |||
| 91 | } | 91 | } |
| 92 | ``` | 92 | ``` |
| 93 | 93 | ||
| 94 | +> [!NOTE] | ||
| 95 | +> Currently, due to an oversight, a preset `fixed` width does not take borders into account. | ||
| 96 | +> I.e., preset `fixed 1000` with 4-wide borders will make the window 992 logical pixels wide. | ||
| 97 | +> This may eventually be corrected. | ||
| 98 | +> | ||
| 99 | +> All other ways of using `fixed` (i.e. `default-column-width` or `set-column-width`) do take borders into account and give you the exact window width that you request. | ||
| 100 | + | ||
| 94 | ### `default-column-width` | 101 | ### `default-column-width` |
| 95 | 102 | ||
| 96 | Set the default width of the new windows. | 103 | Set the default width of the new windows. |
| @@ -116,7 +123,7 @@ layout { | |||
| 116 | > [!NOTE] | 123 | > [!NOTE] |
| 117 | > `default-column-width {}` causes niri to send a (0, H) size in the initial configure request. | 124 | > `default-column-width {}` causes niri to send a (0, H) size in the initial configure request. |
| 118 | > | 125 | > |
| 119 | -> This is a bit unclearly defined in the Wayland protocol, so some clients may misinterpret it. | 126 | +> This is a bit [unclearly defined](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/155) in the Wayland protocol, so some clients may misinterpret it. |
| 120 | > In practice, the only problematic client I saw is [foot](https://codeberg.org/dnkl/foot/), which takes this as a request to have a literal zero width. | 127 | > In practice, the only problematic client I saw is [foot](https://codeberg.org/dnkl/foot/), which takes this as a request to have a literal zero width. |
| 121 | > | 128 | > |
| 122 | > Either way, `default-column-width {}` is most useful for specific windows, in form of a [window rule](https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules) with the same syntax. | 129 | > Either way, `default-column-width {}` is most useful for specific windows, in form of a [window rule](https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules) with the same syntax. |
| @@ -138,9 +145,9 @@ The difference is that the focus ring is drawn only around the active window, wh | |||
| 138 | > This is because windows using client-side decorations can have an arbitrary shape. | 145 | > This is because windows using client-side decorations can have an arbitrary shape. |
| 139 | > | 146 | > |
| 140 | > If you don't like that, you should uncomment the `prefer-no-csd` setting at the top level of the config. | 147 | > If you don't like that, you should uncomment the `prefer-no-csd` setting at the top level of the config. |
| 141 | -> Then, niri will draw focus rings and borders *around* windows that agree to omit their client-side decorations. | 148 | +> Niri will draw focus rings and borders *around* windows that agree to omit their client-side decorations. |
| 142 | > | 149 | > |
| 143 | -> Alternatively, you can override this with the `draw-border-with-background` [window rule](https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules). | 150 | +> Alternatively, you can override this behavior with the `draw-border-with-background` [window rule](https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules). |
| 144 | 151 | ||
| 145 | Focus ring and border have the following options. | 152 | Focus ring and border have the following options. |
| 146 | 153 | ||