diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-13 11:32:54 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-13 14:14:54 +0300 |
| commit | 1c6037e6125870205a878f5267ffb02d3b02db64 (patch) | |
| tree | 990ff2844bc4d2797a66bdc241147365c8efca23 /wiki | |
| parent | fed86fdb5d097b119a3c73c8d8d974b83b49cc5a (diff) | |
| download | niri-1c6037e6125870205a878f5267ffb02d3b02db64.tar.gz niri-1c6037e6125870205a878f5267ffb02d3b02db64.tar.bz2 niri-1c6037e6125870205a878f5267ffb02d3b02db64.zip | |
Add tiled-state window rule, update the tiled state live
Diffstat (limited to 'wiki')
| -rw-r--r-- | wiki/Configuration:-Miscellaneous.md | 5 | ||||
| -rw-r--r-- | wiki/Configuration:-Window-Rules.md | 21 | ||||
| -rw-r--r-- | wiki/FAQ.md | 4 |
3 files changed, 26 insertions, 4 deletions
diff --git a/wiki/Configuration:-Miscellaneous.md b/wiki/Configuration:-Miscellaneous.md index fe758c54..a478c472 100644 --- a/wiki/Configuration:-Miscellaneous.md +++ b/wiki/Configuration:-Miscellaneous.md @@ -60,10 +60,11 @@ Additionally, clients will be informed that they are tiled, removing some rounde With `prefer-no-csd` set, applications that negotiate server-side decorations through the xdg-decoration protocol will have focus ring and border drawn around them *without* a solid colored background. > [!NOTE] -> Unlike most other options, changing `prefer-no-csd` will not affect already running applications. +> Unlike most other options, changing `prefer-no-csd` will not entirely affect already running applications. +> It will make some windows rectangular, but won't remove the title bars. > This mainly has to do with niri working around a [bug in SDL2](https://github.com/libsdl-org/SDL/issues/8173) that prevents SDL2 applications from starting. > -> Restart applications after changing `prefer-no-csd` in the config to apply it. +> Restart applications after changing `prefer-no-csd` in the config to fully apply it. ```kdl prefer-no-csd diff --git a/wiki/Configuration:-Window-Rules.md b/wiki/Configuration:-Window-Rules.md index 5f3d9b49..32ee253f 100644 --- a/wiki/Configuration:-Window-Rules.md +++ b/wiki/Configuration:-Window-Rules.md @@ -91,6 +91,7 @@ window-rule { geometry-corner-radius 12 clip-to-geometry true + tiled-state true min-width 100 max-width 200 @@ -825,6 +826,26 @@ window-rule { } ``` +#### `tiled-state` + +<sup>Since: next release</sup> + +Informs the window that it is tiled. +Usually, windows will react by becoming rectangular and hiding their client-side shadows. +Windows that snap their size to a grid (e.g. terminals like [foot](https://codeberg.org/dnkl/foot)) will usually disable this snapping when they are tiled. + +By default, niri will set the tiled state to `true` together with [`prefer-no-csd`](./Configuration:-Miscellaneous.md) in order to improve behavior for apps that don't support server-side decorations. +You can use this window rule to override this, for example to get rectangular windows with CSD. + +```kdl +// Make tiled windows rectangular while using CSD. +window-rule { + match is-floating=false + + tiled-state true +} +``` + #### Size Overrides You can amend the window's minimum and maximum size in logical pixels. diff --git a/wiki/FAQ.md b/wiki/FAQ.md index bf3bba83..85a9d6d6 100644 --- a/wiki/FAQ.md +++ b/wiki/FAQ.md @@ -1,6 +1,6 @@ ### How to disable client-side decorations/make windows rectangular? -Uncomment the `prefer-no-csd` setting at the [top level](./Configuration:-Miscellaneous.md) of the config. +Uncomment the `prefer-no-csd` setting at the [top level](./Configuration:-Miscellaneous.md) of the config, and then restart your apps. Then niri will ask windows to omit client-side decorations, and also inform them that they are being tiled (which makes some windows rectangular, even if they cannot omit the decorations). Note that currently this will prevent edge window resize handles from showing up. @@ -8,7 +8,7 @@ You can still resize windows by holding <kbd>Mod</kbd> and the right mouse butto ### Why is the border/focus ring showing up through semitransparent windows? -Uncomment the `prefer-no-csd` setting at the [top level](./Configuration:-Miscellaneous.md) of the config. +Uncomment the `prefer-no-csd` setting at the [top level](./Configuration:-Miscellaneous.md) of the config, and then restart your apps. Niri will draw focus rings and borders *around* windows that agree to omit their client-side decorations. By default, focus ring and border are rendered as a solid background rectangle behind windows. |
