Recently I've bought Dell XPS-15 9550 with great 4k display (3840x2160). But when my gentoo booted I was very disappointed - it looked very ugly. Some apps looked normal - thunderbird, Telegram, but most was unusable like gimp - with tiny icons and broken fonts. It takes some time to tune everything back.

xandr DPI

In the ~/.xinitrc file before starting window manager invoke xrandr command:

xrandr --dpi 194
exec /usr/bin/awesome

Fonts settings

Change some X settings in ~/.Xresources (simlink ~/.Xdefaults to it):

Xft.dpi: 194
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.antialias: true
Xft.rgba: none

GTK

Modern GTK applications built with gtk+-3, but there are many supporting only gtk+-2. I chose scalable gtk-3 theme on gnome-look.org and put it into ~/.themes directory. Almost every gtk-3 theme support gtk-2. I had to install some gtk engines with my package manager:

sudo emerge -av --quiet gtk-engines-murrine
sudo emerge -av --quiet gdk-pixbuf

GTK generations has different setting files:

~/.gtkrc-2.0

gtk-theme-name = "Vertex-Dark"

~/.config/gtk-3.0/settings.ini

[Settings]
gtk-icon-theme-name = Vertex
gtk-theme-name = Vertex
gtk-application-prefer-dark-theme = true

If you can, replace all GTK+-2 applications with GTK+-3 analogues (gqview was replaced with gthumb, gimp was rebuild from sources in gtk3-port branch) see ebuild in hoxnox-portage-overlay on github. If you can't build gimp from source, another workaround - special icon theme (48x48). Put it in ~/.themes and include gtkrc file:

~/.gtkrc-2.0

gtk-theme-name = "Vertex-Dark"
include '/home/hoxnox/.themes/Theme-Symbolic-Big-48/gtkrc'

GTK-3 applications can scale. Just add two environment variales:

GDK_DPI_SCALE=0.5
GDK_SCALE=2

Qt have QT_DEVICE_PIXEL_RATIO variable, but it doesn't help my apps.

Cursor

Install any scalable cursor theme:

emerge -av --quiet vanilla-dmz-aa-xcursors

And apply it globally in ~/.Xresources file

Xcursor.theme: Vanilla-DMZ-AA
Xcursor.size: 48

for chromium:

ln -s ~/.Xresources ~/.Xdefaults

for awesome-wm:

mkdir ~/.icons
ln -s ~/.icons/default /usr/share/cursors/xorg-X11/Vanilla-DMZ-AA

I've included cursor size lines into gtk settings files:

~/.gtkrc-2.0

gtk-cursor-theme-name = "Vanilla-DMZ-AA"
gtk-cursor-theme-size = 48

~/.config/gtk-3.0/settings.ini

gtk-cursor-theme-name = Vanilla-DMZ-AA
gtk-cursor-theme-size = 48

adwaita warnings

Some GTK applications gave me warnings:

Gtk-WARNING **: Загружаемый модуль тем не найден в module_path: «adwaita»,

This module comes in standard gnome theme pack:

emerge -av --quiet gnome-themes-standard

Comments

comments powered by Disqus