From 4a60eb885895b40d19f65fcf170023c899f436f3 Mon Sep 17 00:00:00 2001 From: musjj <72612857+musjj@users.noreply.github.com> Date: Sun, 22 Dec 2024 18:59:32 +0700 Subject: [PATCH 1/2] stylix: use floats for font sizes (cherry picked from commit 75f38f9edffba44cf2f18f4df89850f9c3cb1ddb) --- stylix/fonts.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stylix/fonts.nix b/stylix/fonts.nix index 07e10c54b..74eac7923 100644 --- a/stylix/fonts.nix +++ b/stylix/fonts.nix @@ -58,35 +58,35 @@ in { sizes = { desktop = lib.mkOption { description = '' - The font size used in window titles/bars/widgets elements of + The font size (in pt) used in window titles/bars/widgets elements of the desktop. ''; - type = lib.types.ints.unsigned; + type = with lib.types; (either ints.unsigned float); default = 10; }; applications = lib.mkOption { description = '' - The font size used by applications. + The font size (in pt) used by applications. ''; - type = lib.types.ints.unsigned; + type = with lib.types; (either ints.unsigned float); default = 12; }; terminal = lib.mkOption { description = '' - The font size for terminals/text editors. + The font size (in pt) for terminals/text editors. ''; - type = lib.types.ints.unsigned; + type = with lib.types; (either ints.unsigned float); default = cfg.sizes.applications; }; popups = lib.mkOption { description = '' - The font size for notifications/popups and in general overlay + The font size (in pt) for notifications/popups and in general overlay elements of the desktop. ''; - type = lib.types.ints.unsigned; + type = with lib.types; (either ints.unsigned float); default = cfg.sizes.desktop; }; }; From 2f12ba6697c4af576bc798bf937a6c73f9e0a24d Mon Sep 17 00:00:00 2001 From: musjj <72612857+musjj@users.noreply.github.com> Date: Sun, 22 Dec 2024 20:13:25 +0700 Subject: [PATCH 2/2] xresources: convert font size to a string A hack necessary because of a home-manager limitation. It works because numbers and strings are serialized the same way for .Xresources. It should be reverted after this issue is addressed upstream. (cherry picked from commit aec7be45cf896c52c38ee99b7e1a21f4c6d4ccd4) --- modules/xresources/hm.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/xresources/hm.nix b/modules/xresources/hm.nix index 47bce0bd9..7d640ed98 100644 --- a/modules/xresources/hm.nix +++ b/modules/xresources/hm.nix @@ -7,7 +7,7 @@ config = lib.mkIf (config.stylix.enable && config.stylix.targets.xresources.enable) { xresources.properties = with config.lib.stylix.colors.withHashtag; with config.stylix.fonts; { "*.faceName" = monospace.name; - "*.faceSize" = sizes.terminal; + "*.faceSize" = toString sizes.terminal; "*.renderFont" = true; "*foreground" = base05; "*background" = base00;