diff --git a/options/custom/default.nix b/options/custom/default.nix index fcff8e9..f9f6b5c 100644 --- a/options/custom/default.nix +++ b/options/custom/default.nix @@ -34,5 +34,12 @@ in { ### Misc 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";}; + }; }; } diff --git a/options/custom/desktops/hyprland/plugins.nix b/options/custom/desktops/hyprland/plugins.nix index da9a8bc..7c77aab 100644 --- a/options/custom/desktops/hyprland/plugins.nix +++ b/options/custom/desktops/hyprland/plugins.nix @@ -40,7 +40,7 @@ in { bar_padding = 10; bar_precedence_over_border = true; # Render borders around hyprbars bar_text_align = "left"; - bar_text_font = "monospace"; + bar_text_font = config.custom.font.monospace; bar_text_size = 11; #// bar_title_enabled = false; "col.text" = "rgb(93a1a1)"; diff --git a/options/custom/desktops/hyprland/settings.nix b/options/custom/desktops/hyprland/settings.nix index 5373f12..5f84fc4 100644 --- a/options/custom/desktops/hyprland/settings.nix +++ b/options/custom/desktops/hyprland/settings.nix @@ -156,7 +156,7 @@ in { disable_hyprland_logo = true; disable_splash_rendering = true; focus_on_activate = true; - font_family = "monospace"; + font_family = config.custom.font.monospace; force_default_wallpaper = 0; key_press_enables_dpms = true; middle_click_paste = false; diff --git a/options/custom/programs/ags/style.css b/options/custom/programs/ags/style.css index e267fe0..3a2cff6 100644 --- a/options/custom/programs/ags/style.css +++ b/options/custom/programs/ags/style.css @@ -2,6 +2,6 @@ ***/ .bar { - font: 18px monospace; + /* font: 18px monospace; */ color: #eee8d5; } diff --git a/options/custom/programs/anyrun.nix b/options/custom/programs/anyrun.nix index e35d3a1..7eb8d06 100644 --- a/options/custom/programs/anyrun.nix +++ b/options/custom/programs/anyrun.nix @@ -47,7 +47,7 @@ in { *:focus { outline: none; } #window { - font: 16px monospace; + font: 16px ${config.custom.font.monospace}; background: none; } diff --git a/options/custom/programs/firefox.nix b/options/custom/programs/firefox.nix index 5beb7b9..82ff3dc 100644 --- a/options/custom/programs/firefox.nix +++ b/options/custom/programs/firefox.nix @@ -72,15 +72,15 @@ in { "gnomeTheme.bookmarksToolbarUnderTabs" = true; "gnomeTheme.systemIcons" = true; - "font.default.x-unicode" = "sans-serif"; - "font.default.x-western" = "sans-serif"; - "font.name-list.emoji" = "emoji"; # System emoji - "font.name.monospace.x-unicode" = "monospace"; - "font.name.monospace.x-western" = "monospace"; - "font.name.sans-serif.x-unicode" = "sans-serif"; - "font.name.sans-serif.x-western" = "sans-serif"; - "font.name.serif.x-unicode" = "sans-serif"; - "font.name.serif.x-western" = "sans-serif"; + "font.default.x-unicode" = config.custom.font.sans-serif; + "font.default.x-western" = config.custom.font.sans-serif; + "font.name-list.emoji" = config.custom.font.emoji; # System emoji + "font.name.monospace.x-unicode" = config.custom.font.monospace; + "font.name.monospace.x-western" = config.custom.font.monospace; + "font.name.sans-serif.x-unicode" = config.custom.font.sans-serif; + "font.name.sans-serif.x-western" = config.custom.font.sans-serif; + "font.name.serif.x-unicode" = config.custom.font.sans-serif; + "font.name.serif.x-western" = config.custom.font.sans-serif; "full-screen-api.ignore-widgets" = false; # Fake fullscreen "full-screen-api.warning.delay" = -1; "full-screen-api.warning.timeout" = 0; diff --git a/options/custom/programs/foot.nix b/options/custom/programs/foot.nix index 82c4084..e59d106 100644 --- a/options/custom/programs/foot.nix +++ b/options/custom/programs/foot.nix @@ -15,7 +15,7 @@ in { # https://codeberg.org/dnkl/foot/src/branch/master/foot.ini settings = { - main.font = "monospace:size=12"; + main.font = "${config.custom.font.monospace}:size=12"; scrollback.lines = 10000; # Default 1000 # Solarized Dark diff --git a/options/custom/programs/hyprlock.nix b/options/custom/programs/hyprlock.nix index 3ef4985..6ff17b1 100644 --- a/options/custom/programs/hyprlock.nix +++ b/options/custom/programs/hyprlock.nix @@ -49,7 +49,7 @@ in { label = { color = "rgb(fdf6e3)"; - font_family = "monospace"; + font_family = config.custom.font.monospace; font_size = 48; halign = "center"; position = "0, 200"; diff --git a/options/custom/programs/kitty.nix b/options/custom/programs/kitty.nix index 70ade84..fd5fa14 100644 --- a/options/custom/programs/kitty.nix +++ b/options/custom/programs/kitty.nix @@ -15,7 +15,7 @@ in { enable = true; font = { - name = "monospace"; + name = config.custom.font.monospace; size = 14; }; diff --git a/options/custom/programs/rofi.nix b/options/custom/programs/rofi.nix index a581ec0..2656751 100644 --- a/options/custom/programs/rofi.nix +++ b/options/custom/programs/rofi.nix @@ -32,7 +32,7 @@ in { #?? rofi-theme-selector theme = "custom"; - font = "monospace 16"; + font = "${config.custom.font.monospace} 16"; # https://github.com/davatorium/rofi/blob/next/CONFIG.md extraConfig = { diff --git a/options/custom/programs/swaylock.nix b/options/custom/programs/swaylock.nix index 2868654..5e6e52d 100644 --- a/options/custom/programs/swaylock.nix +++ b/options/custom/programs/swaylock.nix @@ -31,7 +31,7 @@ in { indicator-idle-visible = true; indicator-radius = 150; font-size = 48 * config.custom.scale; - font = "monospace"; + font = config.custom.font.monospace; image = mkIf config.custom.wallpaper "/tmp/altered.png"; bs-hl-color = "93a1a1"; color = "073642"; diff --git a/options/custom/programs/walker/default.nix b/options/custom/programs/walker/default.nix index 35140ce..a0a077f 100644 --- a/options/custom/programs/walker/default.nix +++ b/options/custom/programs/walker/default.nix @@ -74,7 +74,13 @@ in { # https://github.com/abenz1267/walker/wiki/Theming 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 layout.ui.window.box = rec { diff --git a/options/custom/programs/walker/style.css b/options/custom/programs/walker/style.css index c0d1a35..c74df9d 100644 --- a/options/custom/programs/walker/style.css +++ b/options/custom/programs/walker/style.css @@ -14,7 +14,6 @@ https://docs.gtk.org/gtk4/css-properties.html background: #002b36; border: 2px #073642 solid; border-radius: 25px; - font: larger sans-serif; padding: 4px; } diff --git a/options/custom/programs/wezterm/config.lua b/options/custom/programs/wezterm/config.lua index f266c5f..6a0906e 100644 --- a/options/custom/programs/wezterm/config.lua +++ b/options/custom/programs/wezterm/config.lua @@ -9,10 +9,6 @@ config.enable_wayland = false -- # BUG: Font weight does not render properly with WebGpu -- 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 diff --git a/options/custom/programs/wezterm/default.nix b/options/custom/programs/wezterm/default.nix index 1e4de34..4a65764 100644 --- a/options/custom/programs/wezterm/default.nix +++ b/options/custom/programs/wezterm/default.nix @@ -21,6 +21,8 @@ in { local act = wezterm.action local config = wezterm.config_builder() + config.font = wezterm.font('${config.custom.font.monospace}') + -- # TODO: Remove when using Wayland config.font_size = ${toString (14 * config.custom.scale)} diff --git a/options/custom/services/mako.nix b/options/custom/services/mako.nix index cbee405..f098afb 100644 --- a/options/custom/services/mako.nix +++ b/options/custom/services/mako.nix @@ -21,7 +21,7 @@ in { anchor = "top-center"; backgroundColor = "#073642"; borderColor = "#002b36"; - font = "sans-serif 12"; + font = "${config.custom.font.sans-serif} 12"; layer = "overlay"; margin = "20"; padding = "10"; diff --git a/options/custom/settings/dconf/apps.nix b/options/custom/settings/dconf/apps.nix index 35d7c94..36c3dae 100644 --- a/options/custom/settings/dconf/apps.nix +++ b/options/custom/settings/dconf/apps.nix @@ -25,7 +25,7 @@ in { fill-tabs = mkBoolean true; floating-controls = mkBoolean true; floating-controls-hover-area = mkUint32 10; - font = mkString "monospace 14"; + font = mkString "${config.custom.font.monospace} 14"; headerbar-drag-area = mkBoolean false; notify-process-completion = mkBoolean false; opacity = mkUint32 100; @@ -71,7 +71,7 @@ in { cursor-blink = mkBoolean false; gtk-enable-primary-paste = mkBoolean false; color-scheme = mkString "prefer-dark"; - monospace-font-name = mkString "monospace 14"; + monospace-font-name = mkString "${config.custom.font.monospace} 14"; }; # GNOME Files diff --git a/options/custom/settings/fonts.nix b/options/custom/settings/fonts.nix index 310e0b2..e59d14d 100644 --- a/options/custom/settings/fonts.nix +++ b/options/custom/settings/fonts.nix @@ -37,10 +37,10 @@ in { #?? fc-list --brief | grep family: | sort fontconfig.defaultFonts = { - emoji = ["Noto Color Emoji"]; - monospace = ["Iosevka NFP SemiBold"]; - sansSerif = ["Outfit"]; - serif = ["Liberation Serif"]; + emoji = [config.custom.font.emoji]; + monospace = [config.custom.font.monospace]; + sansSerif = [config.custom.font.sans-serif]; + serif = [config.custom.font.serif]; }; }; diff --git a/options/custom/settings/gtk/default.nix b/options/custom/settings/gtk/default.nix index c581ca1..30e1702 100644 --- a/options/custom/settings/gtk/default.nix +++ b/options/custom/settings/gtk/default.nix @@ -27,7 +27,7 @@ in { }; font = { - name = "sans-serif"; + name = config.custom.font.sans-serif; size = 12; };