aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRichard Marko <srk@48.io>2019-05-29 20:01:04 +0200
committerRobert Helgesson <robert@rycee.net>2019-05-30 13:40:15 +0200
commitd7eaeaf63622864778c98fcadb4e4d580c06bd45 (patch)
tree927be8ace1f83de39adf61d2ac1a17193233f1d6 /modules
parent2e13c3cdfdb86e0d7dc0dd7a690db417714e4334 (diff)
random-background: add option `display`
This option parameterizes the `--bg-*` argument for feh.
Diffstat (limited to 'modules')
-rw-r--r--modules/services/random-background.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/services/random-background.nix b/modules/services/random-background.nix
index 2af7af0b126..742642fb7a3 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";
};