-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
kconifg:init #2565
kconifg:init #2565
Conversation
Some thoughts after trying something like this locally: Activate after linkGeneration rather than writeBoundary so if someone removes an old home-manager config for one of these files and then sets it up this way, the old link is removed before trying to set it. Ask KWin and KGlobalSettings to reload configs so they can apply immediately. Seems to work for me but not confident this reloads all configs: $DRY_RUN_CMD ${pkgs.libsForQt5.qt5.qttools.bin}/bin/qdbus org.kde.KWin /KWin reconfigure || echo "KWin reconfigure failed"
# the actual values are https://github.com/KDE/plasma-workspace/blob/c97dddf20df5702eb429b37a8c10b2c2d8199d4e/kcms/kcms-common_p.h#L13
for changeType in {0..10}; do
$DRY_RUN_CMD ${pkgs.dbus}/bin/dbus-send --type=signal /KGlobalSettings org.kde.KGlobalSettings.notifyChange int32:$changeType int32:0 || echo "KGlobalSettings.notifyChange failed"
done |
The file is created without problems
That requires dbus access, not aviable in nixos module until #2548 is merged |
Strange, it works for me already, tested by toggling settings and confirming they are applied immediately with that change. |
@LunNova If you are using home-manager from the terminal and not as a NixOS module then it should work, yes. |
modules/misc/qt/kconfig.nix
Outdated
g=''" --group "''; | ||
groupPortion = ''.[1:-2]|join(${g})''; | ||
getVal = "$G|getpath($P)"; | ||
mkExecLn = ''"${w}"+.[0]+${g}+(${groupPortion})+" --key "+.[-1]+(${getVal})''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it support inner groups? I don't completely understand what happens here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, all that is specifically to support inner groups
Can we have a setting to wait until default kde configs are created? Here I set hotkeys in khotkeysrc but expect that default hotkeys are set by kde: https://github.com/kurnevsky/nixfiles/blob/0ba02c1adf544d6f635fe9d5a50046e93fbd4955/modules/kde.nix#L211 If config is created by kwriteconfig5 kde won't set defaults I suppose. |
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
Still relevant
kwriteconfig modifies the old configs without deleting them,so old configuration would not me modified if not opresent in the nix config |
d6be931
to
6b39aea
Compare
6946097
to
f0643ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution and sorry for the very late review.
I have no mean to test the PR and assume you have been using it and testing it for some time.
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
Going to poke at this to keep it alive. |
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
b354e90
to
6af3961
Compare
Still waiting for the review |
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
e42e52e
to
ba5460a
Compare
I added a minor fixup commit. Please have a look, if it seems fine then I'll squash it and merge. |
modules/misc/qt/kconfig.nix
Outdated
pkgs.runCommandLocal "kwriteconfig.sh" { | ||
passAsFile = [ "cfg" "jqScript" ]; | ||
cfg = builtins.toJSON (lib.mapAttrsRecursive toKconfVal cfg); | ||
jqScript = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote it in nix with support of multiple inner groups without this jq
sorcery, if you are interested:
kurnevsky/nixfiles@68ed3b9#diff-580825c1977fc8552d050516c2b2eb93dcb9d0ce88dfece8bba8816d576ad290R317
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I followed your example
f91980c
to
c19c242
Compare
Thanks a lot for your patience and hard work! Finally merged to master now 🙂 |
Description
Fixes #607 by providing a way to programattically set kde configuration files.
However as note that any theme changed with this module requires a logout, as the proper way would be to exec
plasma-apply-*
and those commands seem to require a working DBus and thus #2548 for testing on my setup.Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-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
Added myself as module maintainer. See example.
Added myself and the module files to
.github/CODEOWNERS
.