From d7eaeaf63622864778c98fcadb4e4d580c06bd45 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Wed, 29 May 2019 20:01:04 +0200 Subject: [PATCH] random-background: add option `display` This option parameterizes the `--bg-*` argument for feh. --- modules/services/random-background.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/services/random-background.nix b/modules/services/random-background.nix index 2af7af0b1..742642fb7 100644 --- a/modules/services/random-background.nix +++ b/modules/services/random-background.nix @@ -25,6 +25,12 @@ in ''; }; + display = mkOption { + type = types.enum [ "center" "fill" "max" "scale" "tile" ]; + default = "fill"; + description = "Display background images according to this option."; + }; + interval = mkOption { default = null; type = types.nullOr types.str; @@ -50,7 +56,7 @@ in Service = { Type = "oneshot"; - ExecStart = "${pkgs.feh}/bin/feh --randomize --bg-fill ${cfg.imageDirectory}"; + ExecStart = "${pkgs.feh}/bin/feh --randomize --bg-${cfg.display} ${cfg.imageDirectory}"; IOSchedulingClass = "idle"; };