mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
Don't set background to black if ~/.background-image not prese… (#78346)
Don't set background to black if ~/.background-image not present
This commit is contained in:
commit
766b78841f
|
@ -68,21 +68,15 @@ in
|
|||
scripts before forwarding the value to the
|
||||
<varname>displayManager</varname>.
|
||||
'';
|
||||
apply = list: {
|
||||
list = map (d: d // {
|
||||
manage = "desktop";
|
||||
start = d.start
|
||||
+ optionalString (needBGCond d) ''
|
||||
if [ -e $HOME/.background-image ]; then
|
||||
${pkgs.feh}/bin/feh --bg-${cfg.wallpaper.mode} ${optionalString cfg.wallpaper.combineScreens "--no-xinerama"} $HOME/.background-image
|
||||
else
|
||||
# Use a solid black background as fallback
|
||||
${pkgs.xorg.xsetroot}/bin/xsetroot -solid black
|
||||
fi
|
||||
'';
|
||||
}) list;
|
||||
needBGPackages = [] != filter needBGCond list;
|
||||
};
|
||||
apply = map (d: d // {
|
||||
manage = "desktop";
|
||||
start = d.start
|
||||
+ optionalString (needBGCond d) ''
|
||||
if [ -e $HOME/.background-image ]; then
|
||||
${pkgs.feh}/bin/feh --bg-${cfg.wallpaper.mode} ${optionalString cfg.wallpaper.combineScreens "--no-xinerama"} $HOME/.background-image
|
||||
fi
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
default = mkOption {
|
||||
|
@ -100,5 +94,5 @@ in
|
|||
|
||||
};
|
||||
|
||||
config.services.xserver.displayManager.session = cfg.session.list;
|
||||
config.services.xserver.displayManager.session = cfg.session;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue