bspwm: Add HiDPI support for GTK applications

It turns out that GDK_SCALE and GDK_DPI_SCALE is what you need to add
HiDPI support to GTK applications. Since you probably have .Xresources
adjusted for your HiDPI display, you will need to set both GDK_SCALE and
GDK_DPI_SCALE at the same time to render things properly.

Ironically, I never got this to work before. Maybe because I was always
using 'GTK_SCALE' instead of 'GDK_SCALE', or maybe because I never used
both GDK_SCALE and GDK_DPI_SCALE at the same time.

This gives me full HiDPI support in bspwm, with the exception of a few
applications (polybar, dunst) that don't honor DPI as of this writing.
This commit is contained in:
Donovan Glover 2018-11-21 19:03:55 -05:00
parent 0e0fe82b03
commit 5679c7092c
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -8,6 +8,9 @@ export QT_AUTO_SCREEN_SCALE_FACTOR="0"
export QT_FONT_DPI="192"
export QT_SCREEN_SCALE_FACTORS="VGA-1=2;"
export GDK_SCALE="2"
export GDK_DPI_SCALE="0.5"
export XCURSOR_THEME="breeze_cursors"
export XDG_DATA_DIRS="/usr/share:/usr/share:/usr/local/share"