lib/types/fontType: Add size attribute (#1848)

* lib/types: Add size attribute to fontType
* tests: Add test for kitty
* modules/types/fontType: Make size nullable
* Add release notes

Co-authored-by: Sebastian Zivota <sebastian.zivota@mailbox.org>
This commit is contained in:
Sebastian Zivota 2021-04-07 16:18:09 +02:00 committed by GitHub
parent cc60c22c69
commit 33edf558a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 83 additions and 5 deletions

View file

@ -128,8 +128,12 @@ in {
};
config = mkIf cfg.enable (let
ini = optionalAttrs (cfg.font != null) { gtk-font-name = cfg.font.name; }
// optionalAttrs (cfg.theme != null) { gtk-theme-name = cfg.theme.name; }
ini = optionalAttrs (cfg.font != null) {
gtk-font-name = let
fontSize =
optionalString (cfg.font.size != null) " ${toString cfg.font.size}";
in "${cfg.font.name}" + fontSize;
} // optionalAttrs (cfg.theme != null) { gtk-theme-name = cfg.theme.name; }
// optionalAttrs (cfg.iconTheme != null) {
gtk-icon-theme-name = cfg.iconTheme.name;
};