DPI settings in Awesome window manager
With awesome 4.0 on Debian stretch, no patch as in the answer of Sardathrion is needed, that is to change your dpi to get a proper screen setup, you need to
1) Create the .Xresources file with your settings, that is
Xft.dpi: 192
If you are wondering about the right DPI value, see this post. I used the next value that was a multiple of 96.
For more interesting settings, check out the informative Arch wiki entry
2) I needed to include the settings from .Xresources by adding the following line to the file .xinitrc
xrdb -merge ~/.Xresources
An inelegant hack!
Currently, I am using a mix of
xrandr --output HDMI-1 --scale 0.8x0.8
export GDK_SCALE=2
export GDK_DPI_SCALE=0.6
And setting fonts. Mostly, it was taken from Arch Linux's section on HiDPI.
Not elegant at all ☹
A real solution…
Background
Issue 760 suggests that the current master branch of awesome does support custom DPI. And issue 1225 is my attempt at doing things properly.
Install master
branch
sudo dnf uninstall awesome # ← This might unisntall dependencies, re-install those!
sudo dnf install -y xorg-x11-server-Xephyr
cd ~/src/awesome # Or where ever the source is.
rm -r .build*
You now need to apply this patch, once that'd done resume:
make CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX:PATH=/usr -DAWESOME_DOC_PATH=/usr/share/doc/awesome -DSYSCONFDIR=/etc " all package
sudo rpm --vv --install build/awesome*rpm
Xephyr :1 &
DISPLAY=:1 awesome -c /etc/xdg/awesome/rc.lua
If the above works, you should be nearly there. If not, use dnf
to install awesome
.
Nearly done, just some book keeping left.
You old configuration will not longer work, so you need to get the files from the xresources theme as well as the default rc.lua
file. I would strongly recommend you take a backup of the old configuration, but really what could go wrong⸮
Your ~/.Xresources
could look like this:
Xft.dpi: 156
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintslight
Make sure you disable awesome
from being updated via dnf
by adding exclude=awesome
to /etc/dnf/dnf.conf
.
Finally, log out (reboot, whatever) and log back in: you should now be ready.