Enable feh only for selected window managers

This commit is contained in:
Daniel Thwaites 2021-11-01 14:11:19 +00:00
parent 3e7dbe6174
commit 95b7629d29
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D

View file

@ -1,7 +1,11 @@
{ pkgs, config, ... }:
{ pkgs, config, lib, ... }:
{
# Set background image
services.xserver.displayManager.sessionCommands =
with lib;
with config.services.xserver.windowManager;
let enable = xmonad.enable || i3.enable;
in {
services.xserver.displayManager.sessionCommands = mkIf enable
"${pkgs.feh}/bin/feh --no-fehbg --bg-scale ${config.stylix.image}";
}