Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow floats for font sizes #692

Merged
merged 2 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/xresources/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions stylix/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
Expand Down
Loading