From b4a46c5e8afbcd7b6d7563eeac6202754f9650c6 Mon Sep 17 00:00:00 2001 From: Varun Narravula Date: Tue, 13 Aug 2024 15:45:16 -0700 Subject: [PATCH] feat(fonts): use telugu numbers for polybar/waybar --- .../graphical/wayland/waybar/default.nix | 2 +- .../graphical/wayland/waybar/style.css | 4 +++- home/profiles/graphical/x11/polybar.nix | 20 +++++++++---------- hosts/nixos/profiles/fontconfig.nix | 2 +- hosts/profiles/fonts.nix | 1 + 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/home/profiles/graphical/wayland/waybar/default.nix b/home/profiles/graphical/wayland/waybar/default.nix index 09a01679..2142422b 100644 --- a/home/profiles/graphical/wayland/waybar/default.nix +++ b/home/profiles/graphical/wayland/waybar/default.nix @@ -172,7 +172,7 @@ in { }; "river/tags" = { "num-tags" = 9; - "tag-labels" = ["一" "二" "三" "四" "五" "六" "七" "八" "九"]; + "tag-labels" = ["౧" "౨" "౩" "౪" "౫" "౬" "౭" "౮" "౯"]; }; "wlr/taskbar" = { format = "{icon}"; diff --git a/home/profiles/graphical/wayland/waybar/style.css b/home/profiles/graphical/wayland/waybar/style.css index f6a55b87..cc28f3af 100644 --- a/home/profiles/graphical/wayland/waybar/style.css +++ b/home/profiles/graphical/wayland/waybar/style.css @@ -2,7 +2,7 @@ color: @text; border: 0; border-radius: 0; - font-family: "monospace", "IBM Plex Sans JP"; + font-family: "monospace"; font-size: 11px; min-height: 0px; min-width: 0px; @@ -31,6 +31,8 @@ window#waybar { } #tags button { + font-family: "Noto Sans Telugu"; + font-size: 2em; margin: 2px 0; padding: 5px 0; border-left: 2px solid @primary; diff --git a/home/profiles/graphical/x11/polybar.nix b/home/profiles/graphical/x11/polybar.nix index fa143167..150b1bf6 100644 --- a/home/profiles/graphical/x11/polybar.nix +++ b/home/profiles/graphical/x11/polybar.nix @@ -103,7 +103,7 @@ in { module-margin-right = 1; separator = ""; font-0 = "BlexMono Nerd Font:size=8;3"; - font-1 = "IBM Plex Sans JP:size=8;0"; + font-1 = "Noto Sans Telugu:size=8;3"; border-bottom-size = 2; border-color = "\${colors.primary}"; cursor-click = "pointer"; @@ -140,15 +140,15 @@ in { label-urgent-foreground = "\${colors.text}"; label-empty-foreground = "\${colors.deactivated}"; - icon-0 = "1;一"; - icon-1 = "2;二"; - icon-2 = "3;三"; - icon-3 = "4;四"; - icon-4 = "5;五"; - icon-5 = "6;六"; - icon-6 = "7;七"; - icon-7 = "8;八"; - icon-8 = "9;九"; + icon-0 = "1;౧"; + icon-1 = "2;౨"; + icon-2 = "3;౩"; + icon-3 = "4;౪"; + icon-4 = "5;౫"; + icon-5 = "6;౬"; + icon-6 = "7;౭"; + icon-7 = "8;౮"; + icon-8 = "9;౯"; }; "module/layout" = { diff --git a/hosts/nixos/profiles/fontconfig.nix b/hosts/nixos/profiles/fontconfig.nix index 8b5d931e..478fdc54 100644 --- a/hosts/nixos/profiles/fontconfig.nix +++ b/hosts/nixos/profiles/fontconfig.nix @@ -1,7 +1,7 @@ _: { fonts.fontconfig.defaultFonts = { monospace = ["BlexMono Nerd Font"]; - sansSerif = ["IBM Plex Sans" "IBM Plex Sans JP"]; + sansSerif = ["IBM Plex Sans" "IBM Plex Sans JP" "Noto Sans Telugu"]; serif = ["IBM Plex Serif"]; }; } diff --git a/hosts/profiles/fonts.nix b/hosts/profiles/fonts.nix index b84c914b..9271a232 100644 --- a/hosts/profiles/fonts.nix +++ b/hosts/profiles/fonts.nix @@ -8,6 +8,7 @@ ibm-plex (nerdfonts.override {fonts = ["IBMPlexMono"];}) font-awesome + noto-fonts ]; fontDir.enable = lib.mkIf (!pkgs.stdenv.isDarwin) true; };