aboutsummaryrefslogtreecommitdiff
path: root/modules/services/random-background.nix
diff options
context:
space:
mode:
authorMichael Fellinger <michael.fellinger@xing.com>2019-08-26 14:11:42 +0200
committerRobert Helgesson <robert@rycee.net>2019-08-26 16:42:00 +0200
commitb2a787ca6937cdfba182fd013d727076157f30b1 (patch)
tree156caf0c37b3b927d567cdc1de434915b457470f /modules/services/random-background.nix
parenteb1b86a5ec7baf1a1ce2c277d568a8751c24a7ee (diff)
random-background: add option `enableXinerama`
Diffstat (limited to 'modules/services/random-background.nix')
-rw-r--r--modules/services/random-background.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/services/random-background.nix b/modules/services/random-background.nix
index 742642fb7a3..789c9164e3c 100644
--- a/modules/services/random-background.nix
+++ b/modules/services/random-background.nix
@@ -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";
};