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>
This commit is contained in:
Devin 2024-12-18 09:15:36 -05:00 committed by GitHub
parent a9e3779949
commit a2d66f2547
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 77 additions and 8 deletions

View file

@ -16,5 +16,18 @@
|| i3.enable
)
)
"${pkgs.feh}/bin/feh --no-fehbg --bg-scale ${config.stylix.image}";
(let
inherit (config.stylix) imageScalingMode;
bg-arg =
if imageScalingMode == "fill"
then "--bg-fill"
else if imageScalingMode == "center"
then "--bg-center"
else if imageScalingMode == "tile"
then "--bg-tile"
else if imageScalingMode == "stretch"
then "--bg-scale"
# Fit
else "--bg-max";
in "${pkgs.feh}/bin/feh --no-fehbg ${bg-arg} ${config.stylix.image}");
}