random-background: add option enableXinerama
This commit is contained in:
parent
eb1b86a5ec
commit
b2a787ca69
|
@ -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";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue