Skip to content

Commit

Permalink
feh: use stylix.imageScalingMode
Browse files Browse the repository at this point in the history
  • Loading branch information
justDeeevin committed Dec 12, 2024
1 parent 06bec5b commit 2335d41
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
16 changes: 14 additions & 2 deletions modules/feh/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
|| spectrwm.enable
|| xmonad.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}");
}
15 changes: 14 additions & 1 deletion modules/feh/nixos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}

0 comments on commit 2335d41

Please sign in to comment.