niri: fix pip dimensions
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
f43b21ec18
commit
2f3eb25867
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue