users/polybar: cosmetic changes

add the better way to fix vertical alignment issue
This commit is contained in:
Dmitriy Pleshevskiy 2022-10-28 15:31:52 +03:00
parent 9e4ed09149
commit 3a14bf229f
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -44,8 +44,10 @@ in
settings = settings =
let let
padding = 1; padding = 1;
# See: https://github.com/polybar/polybar/issues/478 # See: https://github.com/polybar/polybar/issues/478
fontVerticalOffset = "2"; fontVerticalOffset = 2;
mkFont = fontconfig: fontconfig + ";${toString fontVerticalOffset}";
in in
{ {
settings = { settings = {
@ -54,11 +56,11 @@ in
"bar/main" = { "bar/main" = {
monitor = "\${env:MONITOR:DisplayPort-1}"; monitor = "\${env:MONITOR:DisplayPort-1}";
font = [ font = map mkFont [
"Fira Code:size=9:antialias=true;${fontVerticalOffset}" "Fira Code:size=9:antialias=true"
"Fira Code:bold:size=9:antialias=true;${fontVerticalOffset}" "Fira Code:bold:size=9:antialias=true"
"FiraCode Nerd Font Mono:size=9:antialias=true;${fontVerticalOffset}" "FiraCode Nerd Font Mono:size=9:antialias=true"
"FiraCode Nerd Font Mono:size=14:antialias=true;${fontVerticalOffset}" "FiraCode Nerd Font Mono:size=14:antialias=true"
]; ];
modules = { modules = {
left = "xmonad"; left = "xmonad";