11.stylix/modules/wpaperd/hm.nix
Devin a2d66f2547
treewide: extend stylix.imageScalingMode support
Add stylix.imageScalingMode support to all modules except:

- hyprlock
- hyprpaper
- kde
- lightdm
- sway

Closes: https://github.com/danth/stylix/issues/677
Link: https://github.com/danth/stylix/pull/678

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: Daniel Thwaites <danth@danth.me>
2024-12-18 15:15:36 +01:00

17 lines
457 B
Nix

{ config, lib, ... }:
{
options.stylix.targets.wpaperd.enable = config.lib.stylix.mkEnableTarget "wpaperd" true;
config = lib.mkIf (config.stylix.enable && config.stylix.targets.wpaperd.enable) {
programs.wpaperd.settings.any = {
path = "${config.stylix.image}";
mode = let
inherit (config.stylix) imageScalingMode;
in
if imageScalingMode == "fill"
then "fit"
else imageScalingMode;
};
};
}