From b2abe14fdf6d42870f12f9d971f4b9636c06abc6 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 30 Aug 2021 19:11:29 +0200 Subject: [PATCH] Config: Add font DPI settings to Polybar --- .config/polybar/config | 21 ++++++++++++--------- .config/polybar/{colors => xresources} | 4 ++++ 2 files changed, 16 insertions(+), 9 deletions(-) rename .config/polybar/{colors => xresources} (95%) diff --git a/.config/polybar/config b/.config/polybar/config index a4cb908..fe3eee8 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -1,4 +1,4 @@ -include-file = $HOME/.config/polybar/colors +include-file = $HOME/.config/polybar/xresources include-file = $HOME/.config/polybar/modules ; https://github.com/polybar/polybar/wiki/Configuration#global-wm-settings @@ -10,7 +10,6 @@ margin-bottom = 0 [settings] throttle-output = 5 throttle-output-for = 10 -throttle-input-for = 30 screenchange-reload = true @@ -19,6 +18,7 @@ screenchange-reload = true pseudo-transparency = false +; https://github.com/polybar/polybar/wiki/Configuration#bar-settings [bar/polybar] monitor = ${env:MONITOR:eDP-1} @@ -44,12 +44,15 @@ padding-right = 2 module-margin-left = 1 module-margin-right = 2 +dpi-x = ${font.dpi} +dpi-y = ${font.dpi} + ; https://github.com/polybar/polybar/wiki/Fonts -font-0 = "DejaVu Sans:pixelsize=18;3" -font-1 = "Source Han Sans JP Medium:pixelsize=18;3" -font-2 = "Font Awesome 5 Free:style=Regular:pixelsize=16;3" -font-3 = "Font Awesome 5 Free:style=Solid:pixelsize=16;3" -font-4 = "Font Awesome 5 Brands:pixelsize=16;3" +font-0 = "DejaVu Sans:pixelsize=9;3" +font-1 = "Source Han Sans JP Medium:pixelsize=9;3" +font-2 = "Font Awesome 5 Free:style=Regular:pixelsize=8;3" +font-3 = "Font Awesome 5 Free:style=Solid:pixelsize=8;3" +font-4 = "Font Awesome 5 Brands:pixelsize=8;3" modules-left = bspwm modules-center = title @@ -64,8 +67,8 @@ tray-detached = false wm-restack = bspwm ; wm-name = ${env:PANEL_NAME:polybar_panel} -scroll-up = bspwm-deskprev -scroll-down = bspwm-desknext +scroll-up = #bspwm.prev +scroll-down = #bspwm.next cursor-click = pointer ; cursor-scroll = ns-resize diff --git a/.config/polybar/colors b/.config/polybar/xresources similarity index 95% rename from .config/polybar/colors rename to .config/polybar/xresources index 43a2e29..3d3c681 100644 --- a/.config/polybar/colors +++ b/.config/polybar/xresources @@ -30,3 +30,7 @@ bgcolor-inactive = ${xrdb:WmColor.bgcolor_Inactive:#2b2e39} bgcolor-urgent = ${xrdb:WmColor.bgcolor_Urgent:#dc7a43} fgcolor = ${xrdb:WmColor.fgcolor:#ffffff} fgcolor-inactive = ${xrdb:WmColor.fgcolor_Inactive:#676e7d} + +; System font DPI scaling +[font] +dpi = ${xrdb:Xft.dpi:96}