mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 10:19:48 +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:
parent
8eb7c009f0
commit
970b57fd3c
2 changed files with 10 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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''
|
||||
}
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue