From 3a14bf229f9edcc3569450bb1df2662718c1e89d Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Fri, 28 Oct 2022 15:31:52 +0300 Subject: [PATCH] users/polybar: cosmetic changes add the better way to fix vertical alignment issue --- users/modules/window_manager/polybar.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/users/modules/window_manager/polybar.nix b/users/modules/window_manager/polybar.nix index 310ced3..8134636 100644 --- a/users/modules/window_manager/polybar.nix +++ b/users/modules/window_manager/polybar.nix @@ -44,8 +44,10 @@ in settings = let padding = 1; + # See: https://github.com/polybar/polybar/issues/478 - fontVerticalOffset = "2"; + fontVerticalOffset = 2; + mkFont = fontconfig: fontconfig + ";${toString fontVerticalOffset}"; in { settings = { @@ -54,11 +56,11 @@ in "bar/main" = { monitor = "\${env:MONITOR:DisplayPort-1}"; - font = [ - "Fira Code:size=9:antialias=true;${fontVerticalOffset}" - "Fira Code:bold:size=9:antialias=true;${fontVerticalOffset}" - "FiraCode Nerd Font Mono:size=9:antialias=true;${fontVerticalOffset}" - "FiraCode Nerd Font Mono:size=14:antialias=true;${fontVerticalOffset}" + font = map mkFont [ + "Fira Code:size=9:antialias=true" + "Fira Code:bold:size=9:antialias=true" + "FiraCode Nerd Font Mono:size=9:antialias=true" + "FiraCode Nerd Font Mono:size=14:antialias=true" ]; modules = { left = "xmonad";