1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 18:59:47 +01:00

random-background: add option enableXinerama

This commit is contained in:
Michael Fellinger 2019-08-26 14:11:42 +02:00 committed by Robert Helgesson
parent eb1b86a5ec
commit b2a787ca69
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -6,6 +6,11 @@ let
cfg = config.services.random-background; cfg = config.services.random-background;
flags = lib.concatStringsSep " " (
[ "--randomize" "--bg-${cfg.display}" ]
++ lib.optional (!cfg.enableXinerama) "--no-xinerama"
);
in in
{ {
@ -41,6 +46,16 @@ in
as a duration understood by systemd. as a duration understood by systemd.
''; '';
}; };
enableXinerama = mkOption {
default = true;
type = types.bool;
description = ''
Will place a separate image per screen when enabled,
otherwise a single image will be stretched across all
screens.
'';
};
}; };
}; };
@ -56,7 +71,7 @@ in
Service = { Service = {
Type = "oneshot"; Type = "oneshot";
ExecStart = "${pkgs.feh}/bin/feh --randomize --bg-${cfg.display} ${cfg.imageDirectory}"; ExecStart = "${pkgs.feh}/bin/feh ${flags} ${cfg.imageDirectory}";
IOSchedulingClass = "idle"; IOSchedulingClass = "idle";
}; };