1
1
Fork 0

niri: fix pip dimensions

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2025-02-18 14:31:14 -06:00
parent f43b21ec18
commit 2f3eb25867
Signed by: Myned
GPG key ID: C7224454F7881A34

View file

@ -151,12 +151,10 @@ in {
} }
(let (let
# BUG: Fixed width may not take borders into account
# https://github.com/YaLTeR/niri/issues/269
pip = with config.custom; rec { pip = with config.custom; rec {
x = gap; x = gap - border * 2;
y = gap; y = gap;
w = builtins.floor (width * 0.3 - gap); # 30% w = builtins.floor (width * 0.3 - gap * 2 + border * 2 + border + 1); # 30%
h = builtins.floor (w * 9 / 16); # 16:9 h = builtins.floor (w * 9 / 16); # 16:9
}; };
in { in {
@ -164,9 +162,9 @@ in {
matches = [{title = "^Picture.in.[Pp]icture$";}]; matches = [{title = "^Picture.in.[Pp]icture$";}];
default-floating-position = { default-floating-position = {
relative-to = "top-right";
x = pip.x; x = pip.x;
y = pip.y; y = pip.y;
relative-to = "top-right";
}; };
default-column-width.fixed = pip.w; default-column-width.fixed = pip.w;