stylix: improve formatting

This commit is contained in:
Melody Renata 2024-08-07 13:09:47 -04:00
parent 9c046fd394
commit 91daf77600
No known key found for this signature in database
2 changed files with 6 additions and 17 deletions

View file

@ -10,5 +10,5 @@ let
baseName = builtins.baseNameOf img; baseName = builtins.baseNameOf img;
in in
pkgs.runCommand baseName { } '' pkgs.runCommand baseName { } ''
${pkgs.lutgen}/bin/lutgen apply '${img}' -o $out -- ${colors} ${pkgs.lutgen}/bin/lutgen apply '${img}' --output "$out" -- ${colors}
'' ''

View file

@ -20,8 +20,7 @@ let
in json; in json;
generatedScheme = lib.importJSON paletteJSON; generatedScheme = lib.importJSON paletteJSON;
in in {
{
imports = [ imports = [
./image-editors ./image-editors
(lib.mkRemovedOptionModule [ "stylix" "palette" "base00" ] "Using stylix.palette to override scheme is not supported anymore") (lib.mkRemovedOptionModule [ "stylix" "palette" "base00" ] "Using stylix.palette to override scheme is not supported anymore")
@ -105,25 +104,15 @@ in
doesnt fix your monitor perfectly doesnt fix your monitor perfectly
''; '';
}; };
imageEditor = { imageEditor = {
enable = lib.mkOption { enable = lib.mkEnableOption "Update `stylix.image` by applying `stylix.imageEditor.method` to the image";
type = lib.types.bool;
default = false;
description = ''
Update Wallpaper by applying a lut filter to the image
'';
};
method = lib.mkOption { method = lib.mkOption {
type = with lib.types; functionTo (coercedTo package toString path); type = with lib.types; functionTo (coercedTo package toString path);
default = config.lib.stylix.imageEditors.lutgen; default = config.lib.stylix.imageEditors.lutgen;
description = '' description = "Edits the given `stylix.image` argument, outputs to `stylix.generated.image`";
A function to edit the image, takes one argument (the image) example = "config.lib.stylix.imageEditors.lutgen;";
and returns the resulting edited image
'';
example = ''
config.stylix.imageEditor.method = config.lib.stylix.imageEditors.lutgen;
'';
}; };
}; };