1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-18 00:59:44 +01:00

xresources: run xrdb -merge on change

Fixes #400

(cherry picked from commit 7cc36b7703)
This commit is contained in:
Robert Helgesson 2018-09-24 23:19:54 +02:00
parent 26b16162b7
commit 68228fce93
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -69,10 +69,17 @@ in
}; };
config = mkIf (cfg.properties != null || cfg.extraConfig != "") { config = mkIf (cfg.properties != null || cfg.extraConfig != "") {
home.file.".Xresources".text = home.file.".Xresources" = {
concatStringsSep "\n" ([] text =
++ (optional (cfg.extraConfig != "") cfg.extraConfig) concatStringsSep "\n" ([]
++ (optionals (cfg.properties != null) (mapAttrsToList formatLine cfg.properties)) ++ (optional (cfg.extraConfig != "") cfg.extraConfig)
) + "\n"; ++ (optionals (cfg.properties != null) (mapAttrsToList formatLine cfg.properties))
) + "\n";
onChange = ''
if [[ -v DISPLAY ]] ; then
$DRY_RUN_CMD ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.Xresources
fi
'';
};
}; };
} }