]> git.plutz.net Git - blast/commitdiff
added DPI scaling, removed superfluous overlays
authorPaul Hänsch <paul@plutz.net>
Tue, 23 Jul 2019 19:39:48 +0000 (21:39 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 23 Jul 2019 19:39:48 +0000 (21:39 +0200)
modules/display_ws5inch.mk

index ae557c9ef1f1c292e2d828cdb42c1d0395a4c2de..c7698c786a3f66f5880137a3f88656341801efb8 100644 (file)
@@ -15,11 +15,7 @@ hdmi_group=2
 hdmi_mode=87
 hdmi_cvt=800 480 60 6 0 0 0
 hdmi_drive=1
-dtparam=i2c_arm=on
-dtparam=spi=on
-enable_uart=1
 dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
-# Display is better readable from top direction
 display_rotate=${display_rotate}
 endef
 
@@ -44,3 +40,9 @@ _display_ws5inch: ${CFGROOT} _copy _mount
        printf '%s\n' "$${display_ws5inch_cfg}" >"$${CFGROOT}/usr/share/X11/xorg.conf.d/45-evdev.conf"
        mkdir -p "$${CFGROOT}/etc/X11/Xsession.d/"
        printf 'xrandr --size 800x480\n' >"$${CFGROOT}/etc/X11/Xsession.d/10display_resolution"
+       # Correct DPI scaling, although application support is mediocre
+       mkdir -p "$${CFGROOT}/etc/X11/Xresources/"
+       printf 'Xft.dpi: 180\n' >"$${CFGROOT}/etc/X11/Xresources/dpi_resolution"
+       # Workaround for applications that do not handle DPI scaling correctly
+       -sed -i 's;^Exec=chromium;Exec=env GDK_DPI_SCALE=.5 chromium;' $${CFGROOT}/usr/share/applications/chromium*.desktop
+       -sed -i 's;^Exec=firefox;Exec=env GDK_DPI_SCALE=.5 firefox;' $${CFGROOT}/usr/share/applications/firefox*.desktop