1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-29 01:48:31 +02: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;
flags = lib.concatStringsSep " " (
[ "--randomize" "--bg-${cfg.display}" ]
++ lib.optional (!cfg.enableXinerama) "--no-xinerama"
);
in
{
@ -41,6 +46,16 @@ in
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 = {
Type = "oneshot";
ExecStart = "${pkgs.feh}/bin/feh --randomize --bg-${cfg.display} ${cfg.imageDirectory}";
ExecStart = "${pkgs.feh}/bin/feh ${flags} ${cfg.imageDirectory}";
IOSchedulingClass = "idle";
};