How to scale i3 window manager for the HiDPI display

displayi3window-managerx11xorg

I have a Dell XPS 13 9343 2015 with a resolution of 3200×1800 pixels.

I am trying to use i3 windows manager on it but everything is tiny and hardly readable.

I managed to scale every applications (firefox, terminal, etc…) using .Xresources :

! Fonts {{{
Xft.antialias: true
Xft.hinting:   true
Xft.rgba:      rgb
Xft.hintstyle: hintfull
Xft.dpi:       220
! }}}

but i3 interface still does not scale…


I have understood that xrandr --dpi 220 may solve the problem, but I don't know how/where to use it.

Can somebody enlighten me on this issue ?

Best Answer

Since version 4.13 i3 reads DPI information from Xft.dpi (source). So, to set i3 to work with high DPI screens you'll probably need to modify two files.

Add this line to ~/.Xresources with your preferred value:

Xft.dpi: 120

Make sure the settings are loaded properly when X starts in your ~/.xinitrc (source):

xrdb -merge ~/.Xresources
exec i3

Note that it will affect other applications (e.g. your terminal) that read DPI settings from X resources.

Related Question