use scalable font, set Xft.dpi to 107 for non 4K displays

This commit is contained in:
Łukasz Pankowski 2020-07-28 22:03:26 +02:00
parent 2980f360b9
commit 1d4f15f06b
3 changed files with 9 additions and 9 deletions

View File

@ -1,12 +1,11 @@
#if HEIGHT == 2160
Xft.dpi: 160
Xcursor.size: 48
#define EM_FONT Iosevka:pixelsize=30:antialias=true:autohint=true
#else
#define EM_FONT Iosevka:pixelsize=22:antialias=true:autohint=true
Xft.dpi: 107
#endif
emacs.font: EM_FONT
emacs.font: Iosevka-13.5
emacs.cursorBlink: false
emacs.scrollBarWidth: 20
emacs.background: #424242

View File

@ -4,9 +4,9 @@ THEMES_PATH=~/.config/bspwm/themes
CURRENT_THEME_PATH="${THEMES_PATH}/theme.sh"
DEFAULT_THEME=lupan-dark
DMENU_FONT=Iosevka:pixelsize=30
BAR_FONT='Iosevka:size=22:antialias=true:autohint=true;5'
BAR_HEIGHT=40
FONT=Iosevka-13.5
BAR_FONT="${FONT};5"
BAR_HEIGHT=35
CMD="$1"
shift
@ -50,7 +50,7 @@ else
. "${THEMES_PATH}/${DEFAULT_THEME}-theme.sh"
fi
DMENU_ARGS="-nb ${BAR_BG} -nf ${BAR_FG} -sb ${BAR_ACTIVE} -sf ${BAR_FG} -fn ${DMENU_FONT}"
DMENU_ARGS="-nb ${BAR_BG} -nf ${BAR_FG} -sb ${BAR_ACTIVE} -sf ${BAR_FG} -fn ${FONT}"
set_theme() {
echo "THEME=${THEME}" > "${CURRENT_THEME_PATH}"

View File

@ -7,12 +7,13 @@ empty = ${xrdb:polybar.empty:#808080}
[bar/panel]
monitor = ${env:MONITOR:}
dpi = ${xrdb:Xft.dpi:160}
modules-left = bspwm xwindow
modules-right = mpd battery date
wm-restack = bspwm
enable-ipc = true
font-0 = ${xrdb:polybar.font:Iosevka:pixelsize=22:antialias=true:autohint=true;5}
height = ${xrdb:polybar.height:40}
font-0 = ${xrdb:polybar.font:Iosevka-13.5;5}
height = ${xrdb:polybar.height:35}
background = ${colors.background}
foreground = ${colors.foreground}
padding-left = 2