Browse Source

Config: Add font DPI settings to Polybar

master
Riyyi 3 years ago
parent
commit
b2abe14fdf
  1. 21
      .config/polybar/config
  2. 4
      .config/polybar/xresources

21
.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

4
.config/polybar/colors → .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}
Loading…
Cancel
Save