Skip to content

Commit

Permalink
stylix: improve formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LovingMelody committed Sep 3, 2024
1 parent 9c046fd commit 91daf77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
2 changes: 1 addition & 1 deletion stylix/image-editors/lutgen.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ let
baseName = builtins.baseNameOf img;
in
pkgs.runCommand baseName { } ''
${pkgs.lutgen}/bin/lutgen apply '${img}' -o $out -- ${colors}
${pkgs.lutgen}/bin/lutgen apply '${img}' --output "$out" -- ${colors}
''
21 changes: 5 additions & 16 deletions stylix/palette.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ let
in json;
generatedScheme = lib.importJSON paletteJSON;

in
{
in {
imports = [
./image-editors
(lib.mkRemovedOptionModule [ "stylix" "palette" "base00" ] "Using stylix.palette to override scheme is not supported anymore")
Expand Down Expand Up @@ -105,25 +104,15 @@ in
doesnt fix your monitor perfectly
'';
};

imageEditor = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Update Wallpaper by applying a lut filter to the image
'';
};
enable = lib.mkEnableOption "Update `stylix.image` by applying `stylix.imageEditor.method` to the image";

method = lib.mkOption {
type = with lib.types; functionTo (coercedTo package toString path);
default = config.lib.stylix.imageEditors.lutgen;
description = ''
A function to edit the image, takes one argument (the image)
and returns the resulting edited image
'';
example = ''
config.stylix.imageEditor.method = config.lib.stylix.imageEditors.lutgen;
'';
description = "Edits the given `stylix.image` argument, outputs to `stylix.generated.image`";
example = "config.lib.stylix.imageEditors.lutgen;";
};
};

Expand Down

0 comments on commit 91daf77

Please sign in to comment.