Is there a way to have different fontconfig settings per screen ?
I have two 1080p monitors, however one is 13" and the other 27". I would like antialiased fonts on the small monitor, and non-antialiased fonts on the big monitor.
Is there a way to have different fontconfig settings per screen ?
I have two 1080p monitors, however one is 13" and the other 27". I would like antialiased fonts on the small monitor, and non-antialiased fonts on the big monitor.
xrdb uses the C preprocessor (because of course it does), so it supports conditions. Here's a snippet from my .Xresources:
#if SCREEN_NUM == 0
Xft.dpi: 157
#endif
#if SCREEN_NUM == 1
Xft.dpi: 96
Xft.antialias: 0
#endif
Now xrdb -merge will do the right thing on each monitor, and when you log in, assuming one of the myriad X initialization scripts bothers to look at your .Xresources, it will also be set correctly.
(Note: the Arch Linux Font Configuration page has more examples, but in the interest of preserving this for posterity, I have included the relevant example above.)
Here's how I do it:
.Xresources and run xrdb.Xresources and run xrdbHere's an example script for starting intellij Idea on secondary tilted monitor:
#!/bin/sh
sed -i 's/.*Xft.rgba:\s*rgb.*/Xft.rgba: vrgb/' /home/babken/.Xresources
xrdb /home/babken/.Xresources
intellij-idea-ultimate-edition &
sed -i 's/.*Xft.rgba:\s*vrgb.*/Xft.rgba: rgb/' /home/babken/.Xresources
xrdb /home/babken/.Xresources
Though this will work if you keep that program on that monitor only (like I do).