-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fontconfig: workaround KDE overwriting symlink #7960
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
base: master
Are you sure you want to change the base?
fontconfig: workaround KDE overwriting symlink #7960
Conversation
Changing KDE font settings using GUI causes it to convert `$XDG_CONFIG_HOME/fontconfig/conf.d/10-hm-fonts.conf` to a plain file and then insert its own settings. A bug was filed upstream[^1], however upstream does not appear receptive to making any changes. Instead of patching KDE as suggested by upstream, we can simply work around the behavior by providing a mutable file for KDE to do what it wants with. Since it appears that KDE will always use the first file it finds[^2], we create the mutable file `00-aaa-mutable.conf`. [^1]: https://bugs.kde.org/show_bug.cgi?id=498694 [^2]: https://github.com/KDE/plasma-workspace/blob/83bebc7896986eb27e0e1a8c62edaa98f567e2ce/kcms/fonts/kxftconfig.cpp#L192 Fixes: nix-community#5162
|
Looks overall good to me! Can't we even remove the
In the test environment, the |
|
My reasoning for Good to know regarding the test stub! I will give that a shot and update the tests. |
|
Yes, I get that. In case that #8084 is accepted, there also is the option to change the rule type from |
|
Perhaps the best way to handle the mutability would be under the DE's submodule? For example in KDE's module, when enabled it would enable the fontconfig mutable placeholder. Additionally KDE's module could expose a toggle whether to wipe out GUI changes or not? Although I don't use home-manager to configure my DE at all so I don't know if this fits into the current model of things. |
8be8deb to
a8d641b
Compare
Yes, that's the problem. The idea of moving it to the DE's module is good, yet there is no such module in Home Manager. There's only a NixOS module and plasma-manager. |
Description
Changing KDE font settings using GUI causes it to convert
$XDG_CONFIG_HOME/fontconfig/conf.d/10-hm-fonts.confto a plain file and then insert its own settings.A bug was filed upstream1, however upstream does not appear receptive to making any changes.
Instead of patching KDE as suggested by upstream, we can simply work around the behavior by providing a mutable file for KDE to do what it wants with. Since it appears that KDE will always use the first file it finds2, we create the mutable file
00-aaa-local.conf.Fixes: #5162
Checklist
Change is backwards compatible.
Code formatted with
nix fmtornix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.Code tested through
nix run .#tests -- test-allornix-shell --pure tests -A run.all.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
If this PR adds an exciting new feature or contains a breaking change.
Footnotes
https://bugs.kde.org/show_bug.cgi?id=498694 ↩
https://github.com/KDE/plasma-workspace/blob/83bebc7896986eb27e0e1a8c62edaa98f567e2ce/kcms/fonts/kxftconfig.cpp#L192 ↩