-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DPI settings? #109
Comments
I guess the bar should stretch or do something like that, summoning @jvvv for ideas |
I'll do some investigating. Last time I looked into parsing the X Resource Database stuff, there was no direct support. Maybe there is some progress on it somewhere. When I did a port of 9wm to xcb, I was interested in this for an eventual port I had intended to do of larswm to xcb... this was a big part of the reason I put it on the back burner. It will be interesting to see if there has been any new developments. Give me some time to do some digging. Either way, I will look into coming up with something useful for resolution values, etc. |
Ok, I did some initial poking around. Getting data from X Resource Database would require HUGE amounts of code to implement for pure libxcb based program as we have in lemonbar. Btw, even the xcb maintainers seem to be hesitant to do this; I seem to remember one mailing list post mentioning something about 10 foot poles. The only other way of doing it that I can think of is to use the Xrm* libX11 functions... this is not a road I think is worth the travel. I think we would have to use the X11-XCB compat libs and now we have a major rewrite to make the compat stuff to fit. (I may be wrong about this, but that is how I understand things at this time). |
Oh, I didn't mean to parse the Xresource at all, the dpi value can be easily calculated from the monitor size and providing a way to override the default dpi value is trivial. |
Some updates on this, it's just a matter of setting up a proportion between the dimension at 96dpi and the one at Xdpi, so in the end new_size = old_size * new_dpi / 96. Easy peasy. |
I've finally come back to this. Code in PR #128 is ready for testing, critique. Not sure this is exactly what you were talking about, but I'm open to different ways to implement it. |
I've encountered problems on a HiDPI monitor as well. |
You can achieve similar results by tweaking the font sizes by hand, which is what more or less the PR you linked to does. |
I have no problems on hidpi monitor if I set a dpi in Xorg.conf, Xresources and xrandr. |
Is there a way to teach bar to use my system's native DPI (213)? I have set that value in
/etc/X11/xorg.conf.d
, and also for theXft.dpi
setting in.Xresources
(although that one most likely isn't touched by bar). Everything is scaling rather nicely, except that bar is really really tiny (and the font terminus is already set to size 16).The text was updated successfully, but these errors were encountered: