From 1c6037e6125870205a878f5267ffb02d3b02db64 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 13 Mar 2025 11:32:54 +0300 Subject: Add tiled-state window rule, update the tiled state live --- wiki/Configuration:-Window-Rules.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'wiki/Configuration:-Window-Rules.md') 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` + +Since: next release + +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. -- cgit