From 91daf776002b86978d0d067414a76b1dc6c79e0b Mon Sep 17 00:00:00 2001 From: Melody Renata Date: Wed, 7 Aug 2024 13:09:47 -0400 Subject: [PATCH] stylix: improve formatting --- stylix/image-editors/lutgen.nix | 2 +- stylix/palette.nix | 21 +++++---------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/stylix/image-editors/lutgen.nix b/stylix/image-editors/lutgen.nix index cce007d..6298291 100644 --- a/stylix/image-editors/lutgen.nix +++ b/stylix/image-editors/lutgen.nix @@ -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} '' diff --git a/stylix/palette.nix b/stylix/palette.nix index d082dcc..8974058 100644 --- a/stylix/palette.nix +++ b/stylix/palette.nix @@ -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") @@ -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;"; }; };