You are not logged in.
Hello all!
I was wondering if there is any way to make X read and use the .Xresources file only for one special app? I use freetype2-infinality, and I notice a change (for the worse) if I run " xrdb -merge ~/.Xresources " on login. But MATLAB looks quite nasty without antialiasing etc. set in X Resources, and it doesn't respect fontconfig.
Any tips?
Thank you!
Last edited by mariusmeyer (2011-03-31 17:09:28)
Offline
Applications should look for their classname (I don't know if that is guaranteed or just common use). The resource string becomes:
Classname.property: ......
`xprop` and selecting the application will tell you the classname.
And instead of xrdb -merge, use xrdb -load to clear the current database of unwanted entries.
Offline
So, instead of
*Xft.autohint: 0
*Xft.lcdfilter: lcddefault
*Xft.hintstyle: hintfull
*Xft.hinting: 1
*Xft.antialias: 1
*Xft.dpi: 96
*Xft.rgba: rgb
I should have
Matlab*Xft.autohint: 0
Matlab*Xft.lcdfilter: lcddefault
Matlab*Xft.hintstyle: hintfull
Matlab*Xft.hinting: 1
Matlab*Xft.antialias: 1
Matlab*Xft.dpi: 96
Matlab*Xft.rgba: rgb
Right? What I want is to have Xft use these settings only for MATLAB, and no other X apps
EDIT: Tried this, and it didn't work... I suspected as much, since I think Xft is a classname in it's own right. So maybe I have to make Xft do this by some other means?
Last edited by mariusmeyer (2011-03-31 12:18:00)
Offline
You could load a specific resources file before matlab and restore it right after.
E.g. alias matlab='xrdb -load .Xresources.matlab; setsid matlab; sleep 5; xrdb -load .Xresources'
Important being setsid or &. A delay might be needed in case the window has not yet popped up and thus may not have read the resources database yet.
Offline
True, that wasn't such a bad idea I'll try it when I get home from work!
EDIT: Seems the program was using some custom X libs that was shipped with the software. So it doesn't behave the way it should at all. The other program I was going to use this for is, after I thought about it for a sec, compiled for x86 while I'm on a x64 at home. So installing lib32-libxft-lcd from AUR fixed it.
Thank you
Last edited by mariusmeyer (2011-03-31 17:09:11)
Offline