mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
xresources: do not generate file for empty properties
This commit is contained in:
parent
a94c8b072e
commit
600f39f966
2 changed files with 17 additions and 13 deletions
|
@ -75,17 +75,18 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.properties != null || cfg.extraConfig != "") {
|
config = mkIf ((cfg.properties != null && cfg.properties != { })
|
||||||
home.file.".Xresources" = {
|
|| cfg.extraConfig != "") {
|
||||||
text = concatStringsSep "\n" ([ ]
|
home.file.".Xresources" = {
|
||||||
++ optional (cfg.extraConfig != "") cfg.extraConfig
|
text = concatStringsSep "\n" ([ ]
|
||||||
++ optionals (cfg.properties != null)
|
++ optional (cfg.extraConfig != "") cfg.extraConfig
|
||||||
(mapAttrsToList formatLine cfg.properties)) + "\n";
|
++ optionals (cfg.properties != null)
|
||||||
onChange = ''
|
(mapAttrsToList formatLine cfg.properties)) + "\n";
|
||||||
if [[ -v DISPLAY ]] ; then
|
onChange = ''
|
||||||
$DRY_RUN_CMD ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.Xresources
|
if [[ -v DISPLAY ]] ; then
|
||||||
fi
|
$DRY_RUN_CMD ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.Xresources
|
||||||
'';
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
{ xresources = ./xresources.nix; }
|
{
|
||||||
|
xresources = ./xresources.nix;
|
||||||
|
xresources-empty-properties = ./empty.nix;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue