Skip to content
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

.Xresources support #306

Open
dzwdz opened this issue Jul 10, 2021 · 2 comments
Open

.Xresources support #306

dzwdz opened this issue Jul 10, 2021 · 2 comments
Labels
enhancement New feature or request x11

Comments

@dzwdz
Copy link

dzwdz commented Jul 10, 2021

It would be pretty nice if there was an option to use the color scheme / fonts from the user's Xresources.

@skyjake
Copy link
Owner

skyjake commented Jul 10, 2021

Personally I have only a little experience using Xresources for customization, so some additional information would be helpful.

Xresources is an X11-specific feature while Lagrange is a platform-agnostic application. Therefore, this request breaks into two aspects: the internal changes needed for customized color schemes and fonts, and the configuration interface. As to the former, #263 has already been implemented to change UI colors, but not page themes. There is an option to set one custom font as a fallback if the bundled fonts don't work, but system-provided fonts (#195) generally are not implemented yet. Changing the UI font is not supported either.

The configuration interface is primarily Lagrange's own configuration files, which are managed in a cross-platform manner as plain text files. It is possible to add platform-specific alternative configuration methods, such as Xresources, that would override the basic config files.

So, the question is, what would be the added value of Xresources-based customization that would justify adding a redundant configuration interface, considering that the built-in configuration files will already provide a way to customize everything that can be customized? For example, is the use case here to enable customizing Lagrange to look more like other X11 apps on one's system, using wildcard definitions in Xresources?

@skyjake skyjake added enhancement New feature or request x11 labels Jul 10, 2021
@dzwdz
Copy link
Author

dzwdz commented Jul 10, 2021

For example, is the use case here to enable customizing Lagrange to look more like other X11 apps on one's system, using wildcard definitions in Xresources?

Yup - currently pretty much everything on my desktop uses my Xresources settings, and Lagrange is one of the odd ones out. It's nice to have everything use the same colors without having to mess around with the settings too much.

Also, to save you some searching around - here's a code example showing how to read Xresources. I'm not sure if this code fails gracefully when not using X, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request x11
Projects
None yet
Development

No branches or pull requests

2 participants