mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 09:09:45 +01:00
xresources: run xrdb -merge
on change
Fixes #400
(cherry picked from commit 7cc36b7703
)
This commit is contained in:
parent
26b16162b7
commit
68228fce93
1 changed files with 12 additions and 5 deletions
|
@ -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" = {
|
||||||
|
text =
|
||||||
concatStringsSep "\n" ([]
|
concatStringsSep "\n" ([]
|
||||||
++ (optional (cfg.extraConfig != "") cfg.extraConfig)
|
++ (optional (cfg.extraConfig != "") cfg.extraConfig)
|
||||||
++ (optionals (cfg.properties != null) (mapAttrsToList formatLine cfg.properties))
|
++ (optionals (cfg.properties != null) (mapAttrsToList formatLine cfg.properties))
|
||||||
) + "\n";
|
) + "\n";
|
||||||
|
onChange = ''
|
||||||
|
if [[ -v DISPLAY ]] ; then
|
||||||
|
$DRY_RUN_CMD ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.Xresources
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue