Add default-floating-position window rule

This commit is contained in:
Ivan Molodetskikh
2024-12-29 10:39:21 +03:00
parent 744955ba69
commit 3c2e1554c6
6 changed files with 78 additions and 11 deletions
+24
View File
@@ -52,6 +52,7 @@ window-rule {
block-out-from "screencast"
// block-out-from "screen-capture"
variable-refresh-rate true
default-floating-position x=100 y=200
focus-ring {
// off
@@ -507,6 +508,29 @@ window-rule {
}
```
#### `default-floating-position`
<sup>Since: next release</sup>
Set the initial position for this window when it opens on, or moves to the floating layout.
Afterward, the window will remember its last floating position.
By default, new floating windows open at the center of the screen, and windows from the tiling layout open close to their visual screen position.
The position uses logical coordinates relative to the working area.
For example, if you have a bar at the top, then `x=0 y=0` will put the top-left corner of the window directly below the bar.
```kdl
// Open the Firefox picture-in-picture window at the top-left corner of the screen
// with a small gap.
window-rule {
match app-id="firefox$" title="^Picture-in-Picture$"
default-floating-position x=32 y=32
}
```
#### `draw-border-with-background`
Override whether the border and the focus ring draw with a background.