1
1
Fork 0

fonts: use custom option instead of fontconfig common names

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-09-21 10:47:31 -05:00
parent 0a9abef2af
commit 1d4a1b63bb
Signed by: myned
GPG key ID: C7224454F7881A34
19 changed files with 42 additions and 32 deletions

View file

@ -34,5 +34,12 @@ in {
### Misc ### Misc
wallpaper = mkOption {default = false;}; wallpaper = mkOption {default = false;};
font = {
emoji = mkOption {default = "Noto Color Emoji";};
monospace = mkOption {default = "Iosevka NFP SemiBold";};
sans-serif = mkOption {default = "Lexend";};
serif = mkOption {default = "Liberation Serif";};
};
}; };
} }

View file

@ -40,7 +40,7 @@ in {
bar_padding = 10; bar_padding = 10;
bar_precedence_over_border = true; # Render borders around hyprbars bar_precedence_over_border = true; # Render borders around hyprbars
bar_text_align = "left"; bar_text_align = "left";
bar_text_font = "monospace"; bar_text_font = config.custom.font.monospace;
bar_text_size = 11; bar_text_size = 11;
#// bar_title_enabled = false; #// bar_title_enabled = false;
"col.text" = "rgb(93a1a1)"; "col.text" = "rgb(93a1a1)";

View file

@ -156,7 +156,7 @@ in {
disable_hyprland_logo = true; disable_hyprland_logo = true;
disable_splash_rendering = true; disable_splash_rendering = true;
focus_on_activate = true; focus_on_activate = true;
font_family = "monospace"; font_family = config.custom.font.monospace;
force_default_wallpaper = 0; force_default_wallpaper = 0;
key_press_enables_dpms = true; key_press_enables_dpms = true;
middle_click_paste = false; middle_click_paste = false;

View file

@ -2,6 +2,6 @@
***/ ***/
.bar { .bar {
font: 18px monospace; /* font: 18px monospace; */
color: #eee8d5; color: #eee8d5;
} }

View file

@ -47,7 +47,7 @@ in {
*:focus { outline: none; } *:focus { outline: none; }
#window { #window {
font: 16px monospace; font: 16px ${config.custom.font.monospace};
background: none; background: none;
} }

View file

@ -72,15 +72,15 @@ in {
"gnomeTheme.bookmarksToolbarUnderTabs" = true; "gnomeTheme.bookmarksToolbarUnderTabs" = true;
"gnomeTheme.systemIcons" = true; "gnomeTheme.systemIcons" = true;
"font.default.x-unicode" = "sans-serif"; "font.default.x-unicode" = config.custom.font.sans-serif;
"font.default.x-western" = "sans-serif"; "font.default.x-western" = config.custom.font.sans-serif;
"font.name-list.emoji" = "emoji"; # System emoji "font.name-list.emoji" = config.custom.font.emoji; # System emoji
"font.name.monospace.x-unicode" = "monospace"; "font.name.monospace.x-unicode" = config.custom.font.monospace;
"font.name.monospace.x-western" = "monospace"; "font.name.monospace.x-western" = config.custom.font.monospace;
"font.name.sans-serif.x-unicode" = "sans-serif"; "font.name.sans-serif.x-unicode" = config.custom.font.sans-serif;
"font.name.sans-serif.x-western" = "sans-serif"; "font.name.sans-serif.x-western" = config.custom.font.sans-serif;
"font.name.serif.x-unicode" = "sans-serif"; "font.name.serif.x-unicode" = config.custom.font.sans-serif;
"font.name.serif.x-western" = "sans-serif"; "font.name.serif.x-western" = config.custom.font.sans-serif;
"full-screen-api.ignore-widgets" = false; # Fake fullscreen "full-screen-api.ignore-widgets" = false; # Fake fullscreen
"full-screen-api.warning.delay" = -1; "full-screen-api.warning.delay" = -1;
"full-screen-api.warning.timeout" = 0; "full-screen-api.warning.timeout" = 0;

View file

@ -15,7 +15,7 @@ in {
# https://codeberg.org/dnkl/foot/src/branch/master/foot.ini # https://codeberg.org/dnkl/foot/src/branch/master/foot.ini
settings = { settings = {
main.font = "monospace:size=12"; main.font = "${config.custom.font.monospace}:size=12";
scrollback.lines = 10000; # Default 1000 scrollback.lines = 10000; # Default 1000
# Solarized Dark # Solarized Dark

View file

@ -49,7 +49,7 @@ in {
label = { label = {
color = "rgb(fdf6e3)"; color = "rgb(fdf6e3)";
font_family = "monospace"; font_family = config.custom.font.monospace;
font_size = 48; font_size = 48;
halign = "center"; halign = "center";
position = "0, 200"; position = "0, 200";

View file

@ -15,7 +15,7 @@ in {
enable = true; enable = true;
font = { font = {
name = "monospace"; name = config.custom.font.monospace;
size = 14; size = 14;
}; };

View file

@ -32,7 +32,7 @@ in {
#?? rofi-theme-selector #?? rofi-theme-selector
theme = "custom"; theme = "custom";
font = "monospace 16"; font = "${config.custom.font.monospace} 16";
# https://github.com/davatorium/rofi/blob/next/CONFIG.md # https://github.com/davatorium/rofi/blob/next/CONFIG.md
extraConfig = { extraConfig = {

View file

@ -31,7 +31,7 @@ in {
indicator-idle-visible = true; indicator-idle-visible = true;
indicator-radius = 150; indicator-radius = 150;
font-size = 48 * config.custom.scale; font-size = 48 * config.custom.scale;
font = "monospace"; font = config.custom.font.monospace;
image = mkIf config.custom.wallpaper "/tmp/altered.png"; image = mkIf config.custom.wallpaper "/tmp/altered.png";
bs-hl-color = "93a1a1"; bs-hl-color = "93a1a1";
color = "073642"; color = "073642";

View file

@ -74,7 +74,13 @@ in {
# https://github.com/abenz1267/walker/wiki/Theming # https://github.com/abenz1267/walker/wiki/Theming
theme = { theme = {
style = builtins.readFile ./style.css; style = ''
#box {
font: larger ${config.custom.font.sans-serif};
}
${builtins.readFile ./style.css}
'';
# https://github.com/abenz1267/walker/blob/master/internal/config/layout.default.json # https://github.com/abenz1267/walker/blob/master/internal/config/layout.default.json
layout.ui.window.box = rec { layout.ui.window.box = rec {

View file

@ -14,7 +14,6 @@ https://docs.gtk.org/gtk4/css-properties.html
background: #002b36; background: #002b36;
border: 2px #073642 solid; border: 2px #073642 solid;
border-radius: 25px; border-radius: 25px;
font: larger sans-serif;
padding: 4px; padding: 4px;
} }

View file

@ -9,10 +9,6 @@ config.enable_wayland = false
-- # BUG: Font weight does not render properly with WebGpu -- # BUG: Font weight does not render properly with WebGpu
-- https://github.com/wez/wezterm/issues/3032 -- https://github.com/wez/wezterm/issues/3032
-- # BUG: fontconfig is broken in unstable
-- https://github.com/NixOS/nixpkgs/pull/338815
-- config.font = wezterm.font('monospace')
config.font = wezterm.font('Iosevka NFP SemiBold')
config.force_reverse_video_cursor = true -- Invert colors config.force_reverse_video_cursor = true -- Invert colors

View file

@ -21,6 +21,8 @@ in {
local act = wezterm.action local act = wezterm.action
local config = wezterm.config_builder() local config = wezterm.config_builder()
config.font = wezterm.font('${config.custom.font.monospace}')
-- # TODO: Remove when using Wayland -- # TODO: Remove when using Wayland
config.font_size = ${toString (14 * config.custom.scale)} config.font_size = ${toString (14 * config.custom.scale)}

View file

@ -21,7 +21,7 @@ in {
anchor = "top-center"; anchor = "top-center";
backgroundColor = "#073642"; backgroundColor = "#073642";
borderColor = "#002b36"; borderColor = "#002b36";
font = "sans-serif 12"; font = "${config.custom.font.sans-serif} 12";
layer = "overlay"; layer = "overlay";
margin = "20"; margin = "20";
padding = "10"; padding = "10";

View file

@ -25,7 +25,7 @@ in {
fill-tabs = mkBoolean true; fill-tabs = mkBoolean true;
floating-controls = mkBoolean true; floating-controls = mkBoolean true;
floating-controls-hover-area = mkUint32 10; floating-controls-hover-area = mkUint32 10;
font = mkString "monospace 14"; font = mkString "${config.custom.font.monospace} 14";
headerbar-drag-area = mkBoolean false; headerbar-drag-area = mkBoolean false;
notify-process-completion = mkBoolean false; notify-process-completion = mkBoolean false;
opacity = mkUint32 100; opacity = mkUint32 100;
@ -71,7 +71,7 @@ in {
cursor-blink = mkBoolean false; cursor-blink = mkBoolean false;
gtk-enable-primary-paste = mkBoolean false; gtk-enable-primary-paste = mkBoolean false;
color-scheme = mkString "prefer-dark"; color-scheme = mkString "prefer-dark";
monospace-font-name = mkString "monospace 14"; monospace-font-name = mkString "${config.custom.font.monospace} 14";
}; };
# GNOME Files # GNOME Files

View file

@ -37,10 +37,10 @@ in {
#?? fc-list --brief | grep family: | sort #?? fc-list --brief | grep family: | sort
fontconfig.defaultFonts = { fontconfig.defaultFonts = {
emoji = ["Noto Color Emoji"]; emoji = [config.custom.font.emoji];
monospace = ["Iosevka NFP SemiBold"]; monospace = [config.custom.font.monospace];
sansSerif = ["Outfit"]; sansSerif = [config.custom.font.sans-serif];
serif = ["Liberation Serif"]; serif = [config.custom.font.serif];
}; };
}; };

View file

@ -27,7 +27,7 @@ in {
}; };
font = { font = {
name = "sans-serif"; name = config.custom.font.sans-serif;
size = 12; size = 12;
}; };