Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/programs/autorandr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
};

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions tests/modules/programs/autorandr/basic-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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''
}
'';
Expand Down