Skip to content

Commit 2e883a4

Browse files
trueNAHOmake-42
authored andcommitted
stylix/palette: add stylix.colorGeneration.filter option
1 parent 69d702e commit 2e883a4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

stylix/palette.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@ in
2626
'';
2727
};
2828

29+
filter = lib.mkOption {
30+
type = lib.types.enum [
31+
"catmull-rom"
32+
"gaussian"
33+
"lanczos3"
34+
"nearest"
35+
"triangle"
36+
];
37+
default = "lanczos3";
38+
example = "nearest";
39+
description = ''
40+
[Matugen](https://github.com/InioX/matugen)'s resize filter.
41+
'';
42+
};
43+
2944
polarity = lib.mkOption {
3045
type = lib.types.enum [
3146
"dark"
@@ -116,6 +131,7 @@ in
116131
nativeBuildInputs = [ pkgs.matugen ];
117132
env = {
118133
CONTRAST = toString cfg.colorGeneration.contrast;
134+
FILTER = cfg.colorGeneration.filter;
119135
IMAGE = cfg.image;
120136
POLARITY = cfg.colorGeneration.polarity;
121137
SCHEME = cfg.colorGeneration.scheme;
@@ -128,6 +144,7 @@ in
128144
--include-image-in-json false \
129145
--json strip \
130146
--mode "$POLARITY" \
147+
--resize-filter "$FILTER" \
131148
--type "$SCHEME" \
132149
image \
133150
"$IMAGE" |

0 commit comments

Comments
 (0)