forge
Explore
Log in

Don't you dare go Hollow

wiki: Improve Layout

Browse files at this commit

470d65a06082370342fc50f458f1bdf90120669eIvan MolodetskikhParent: 4f42190
wiki/Configuration:-Layout.mdmodified+11 -4
@@ -1,6 +1,6 @@
11 ### Overview
22
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.
44
55 Here are the contents of this section at a glance:
66
@@ -91,6 +91,13 @@ layout {
9191 }
9292 ```
9393
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+
94101 ### `default-column-width`
95102
96103 Set the default width of the new windows.
@@ -116,7 +123,7 @@ layout {
116123 > [!NOTE]
117124 > `default-column-width {}` causes niri to send a (0, H) size in the initial configure request.
118125 >
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.
120127 > 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.
121128 >
122129 > 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
138145 > This is because windows using client-side decorations can have an arbitrary shape.
139146 >
140147 > 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.
142149 >
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).
144151
145152 Focus ring and border have the following options.
146153