From 8409107a5bb04980ea196a5d7095d5c34f6b2e4e Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 30 Dec 2024 08:48:05 +0300 Subject: Implement default-window-height for scrolling windows --- wiki/Configuration:-Window-Rules.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'wiki') diff --git a/wiki/Configuration:-Window-Rules.md b/wiki/Configuration:-Window-Rules.md index 8dc7c4be..6fd5e2a8 100644 --- a/wiki/Configuration:-Window-Rules.md +++ b/wiki/Configuration:-Window-Rules.md @@ -244,6 +244,8 @@ To be precise, they apply at the point when niri sends the initial configure req Set the default width for the new window. +This works for floating windows too, despite the word "column" in the name. + ```kdl // Give Blender and GIMP some guaranteed width on opening. window-rule { @@ -261,14 +263,16 @@ window-rule { Since: next release -Set the default height for the new window if it opens as floating. +Set the default height for the new window. ```kdl -// Make Alacritty take 50% of the screen height on opening. +// Open the Firefox picture-in-picture window as floating with 480×270 size. window-rule { - match app-id="^Alacritty$" + match app-id="firefox$" title="^Picture-in-Picture$" - default-window-height { proportion 0.5; } + open-floating true + default-column-width { fixed 480; } + default-window-height { fixed 270; } } ``` -- cgit