mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
xresources: load .Xresources in xsession.initExtra
This commit is contained in:
parent
9b39fd7eb4
commit
1e8d0beae4
1 changed files with 6 additions and 2 deletions
|
@ -23,6 +23,8 @@ let
|
||||||
toString v;
|
toString v;
|
||||||
in "${n}: ${formatValue v}";
|
in "${n}: ${formatValue v}";
|
||||||
|
|
||||||
|
xrdbMerge = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.rycee ];
|
meta.maintainers = [ maintainers.rycee ];
|
||||||
|
|
||||||
|
@ -45,7 +47,7 @@ in {
|
||||||
X server resources that should be set.
|
X server resources that should be set.
|
||||||
Booleans are formatted as "true" or "false" respectively.
|
Booleans are formatted as "true" or "false" respectively.
|
||||||
List elements are recursively formatted as a string and joined by commas.
|
List elements are recursively formatted as a string and joined by commas.
|
||||||
All other values are directly formatted using builtins.toString.
|
All other values are directly formatted using builtins.toString.
|
||||||
Note, that 2-dimensional lists are not supported and specifying one will throw an exception.
|
Note, that 2-dimensional lists are not supported and specifying one will throw an exception.
|
||||||
If this and all other xresources options are
|
If this and all other xresources options are
|
||||||
<code>null</code>, then this feature is disabled and no
|
<code>null</code>, then this feature is disabled and no
|
||||||
|
@ -84,9 +86,11 @@ in {
|
||||||
(mapAttrsToList formatLine cfg.properties)) + "\n";
|
(mapAttrsToList formatLine cfg.properties)) + "\n";
|
||||||
onChange = ''
|
onChange = ''
|
||||||
if [[ -v DISPLAY ]] ; then
|
if [[ -v DISPLAY ]] ; then
|
||||||
$DRY_RUN_CMD ${pkgs.xorg.xrdb}/bin/xrdb -merge $HOME/.Xresources
|
$DRY_RUN_CMD ${xrdbMerge}
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xsession.initExtra = xrdbMerge;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue