1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

autorandr: add filter option (#2795)

xrandr's filter option is useful for enabling integer scaling on
displays that don't have support for it at a graphics card level.
This commit is contained in:
Kylie McClain 2022-03-17 08:45:04 -04:00 committed by GitHub
parent 8eb7c009f0
commit 970b57fd3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -176,6 +176,13 @@ let
}
'';
};
filter = mkOption {
type = types.nullOr (types.enum [ "bilinear" "nearest" ]);
description = "Interpolation method to be used for scaling the output.";
default = null;
example = "nearest";
};
};
};
@ -261,6 +268,7 @@ let
++ optional (config.mode != "") "mode ${config.mode}"
++ optional (config.rate != "") "rate ${config.rate}"
++ optional (config.rotate != null) "rotate ${config.rotate}"
++ optional (config.filter != null) "filter ${config.filter}"
++ optional (config.transform != null) ("transform "
+ concatMapStringsSep "," toString (flatten config.transform))
++ optional (config.scale != null)

View file

@ -17,6 +17,7 @@
primary = true;
position = "0x0";
mode = "1920x1080";
filter = "nearest";
transform = [
[ 0.6 0.0 0.0 ] # a b c
[ 0.0 0.6 0.0 ] # d e f
@ -50,6 +51,7 @@
crtc 0
primary
mode 1920x1080
filter nearest
transform 0.600000,0.000000,0.000000,0.000000,0.600000,0.000000,0.000000,0.000000,1.000000''
}
'';