aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/zathura.nix
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-02-03 10:05:30 +0100
committerKatharina Fey <kookie@spacekookie.de>2020-02-03 10:05:30 +0100
commitc488527c95c874d3b8743c915173ad7bfb05d5af (patch)
tree2b874dc5606a9dff44096a5e8557f00dc52ac2b6 /home-manager/modules/programs/zathura.nix
parent899a451e08f7d6d2c8214d119c2a0316849a0ed4 (diff)
parent6cc4fd6ede4909226cb81d3475834251ed1b7210 (diff)
Merge commit '6cc4fd6ede4909226cb81d3475834251ed1b7210'
Diffstat (limited to 'home-manager/modules/programs/zathura.nix')
-rw-r--r--home-manager/modules/programs/zathura.nix27
1 files changed, 12 insertions, 15 deletions
diff --git a/home-manager/modules/programs/zathura.nix b/home-manager/modules/programs/zathura.nix
index f01bd501c39..d9f3c1af1fd 100644
--- a/home-manager/modules/programs/zathura.nix
+++ b/home-manager/modules/programs/zathura.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ...}:
+{ config, lib, pkgs, ... }:
with lib;
@@ -9,14 +9,10 @@ let
formatLine = n: v:
let
formatValue = v:
- if isBool v then (if v then "true" else "false")
- else toString v;
- in
- "set ${n}\t\"${formatValue v}\"";
+ if isBool v then (if v then "true" else "false") else toString v;
+ in ''set ${n} "${formatValue v}"'';
-in
-
-{
+in {
meta.maintainers = [ maintainers.rprospero ];
options.programs.zathura = {
@@ -25,7 +21,7 @@ in
focused on keyboard interaction'';
options = mkOption {
- default = {};
+ default = { };
type = with types; attrsOf (either str (either bool int));
description = ''
Add <option>:set</option> command options to zathura and make
@@ -36,7 +32,10 @@ in
</citerefentry>
for the full list of options.
'';
- example = { default-bg = "#000000"; default-fg = "#FFFFFF"; };
+ example = {
+ default-bg = "#000000";
+ default-fg = "#FFFFFF";
+ };
};
extraConfig = mkOption {
@@ -52,10 +51,8 @@ in
config = mkIf cfg.enable {
home.packages = [ pkgs.zathura ];
- xdg.configFile."zathura/zathurarc".text =
- concatStringsSep "\n" ([]
- ++ optional (cfg.extraConfig != "") cfg.extraConfig
- ++ mapAttrsToList formatLine cfg.options
- ) + "\n";
+ xdg.configFile."zathura/zathurarc".text = concatStringsSep "\n" ([ ]
+ ++ optional (cfg.extraConfig != "") cfg.extraConfig
+ ++ mapAttrsToList formatLine cfg.options) + "\n";
};
}