1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-01-11 19:49:49 +01:00

qt: update tooling for Plasma 6

This commit is contained in:
Louis Opter 2024-09-07 13:25:40 -07:00 committed by Robert Helgesson
parent 7080328318
commit 8f4f57f9a6
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -17,13 +17,13 @@ in {
powermanagementprofilesrc.AC.HandleButtonEvents.lidAction = 32; powermanagementprofilesrc.AC.HandleButtonEvents.lidAction = 32;
}; };
description = '' description = ''
A set of values to be modified by {command}`kwriteconfig5`. A set of values to be modified by {command}`kwriteconfig6`.
The example value would cause the following command to run in the The example value would cause the following command to run in the
activation script: activation script:
``` shell ``` shell
kwriteconfig5 --file $XDG_CONFIG_HOME/powermanagementprofilesrc \ kwriteconfig6 --file $XDG_CONFIG_HOME/powermanagementprofilesrc \
--group AC \ --group AC \
--group HandleButtonEvents \ --group HandleButtonEvents \
--group lidAction \ --group lidAction \
@ -53,7 +53,7 @@ in {
lib.mapAttrsToList lib.mapAttrsToList
(group: value: toLine file (path ++ [ group ]) value) value (group: value: toLine file (path ++ [ group ]) value) value
else else
"run test -f '${configHome}/${file}' && run ${pkgs.libsForQt5.kconfig}/bin/kwriteconfig5 --file '${configHome}/${file}' ${ "run ${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 --file '${configHome}/${file}' ${
lib.concatMapStringsSep " " (x: "--group ${x}") lib.concatMapStringsSep " " (x: "--group ${x}")
(lib.lists.init path) (lib.lists.init path)
} --key '${lib.lists.last path}' ${toValue value}"; } --key '${lib.lists.last path}' ${toValue value}";
@ -62,7 +62,7 @@ in {
in builtins.concatStringsSep "\n" lines} in builtins.concatStringsSep "\n" lines}
# TODO: some way to only call the dbus calls needed # TODO: some way to only call the dbus calls needed
run ${pkgs.libsForQt5.qttools.bin}/bin/qdbus org.kde.KWin /KWin reconfigure || echo "KWin reconfigure failed" run ${pkgs.kdePackages.qttools}/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 # the actual values are https://github.com/KDE/plasma-workspace/blob/c97dddf20df5702eb429b37a8c10b2c2d8199d4e/kcms/kcms-common_p.h#L13
for changeType in {0..10}; do for changeType in {0..10}; do
# even if one of those calls fails the others keep running # even if one of those calls fails the others keep running