Skip to content

Commit

Permalink
kconfig: support for multiple groups
Browse files Browse the repository at this point in the history
  • Loading branch information
pasqui23 committed Nov 28, 2022
1 parent f0643ef commit b354e90
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/misc/qt/kconfig.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let
else if v == null then
"--delete"
else if t == "bool" then
"--type bool ${v}"
"--type bool ${builtins.toJSON v}"
else
toString v;
in {
Expand Down Expand Up @@ -41,8 +41,9 @@ in {
paths(strings)|
(. as $p|$cfg|getpath($p)) as $el|
.[0] as $file|
.[1:]|reverse|map("'\(.)'")|join(" --group ")|
"$DRY_RUN_CMD ${pkgs.plasma5Packages.kconfig}/bin/kwriteconfig5 --file '${config.xdg.configHome}/\($file)' --key \(.) \($el)"
.[-1] as $key|
.[1:-2]|map("--group '\(.)'")|join(" ")|
"$DRY_RUN_CMD ${pkgs.plasma5Packages.kconfig}/bin/kwriteconfig5 --file '${config.xdg.configHome}/\($file)' \(.) --key \($key) \($el)"
]|join("\n")
'';
} ''${pkgs.jq}/bin/jq -rf "$jqScriptPath" <"$cfgPath" >"$out"''
Expand All @@ -52,7 +53,7 @@ in {
$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 /KGlobalSettings org.kde.KGlobalSettings.notifyChange int32:$changeType int32:0 || echo "KGlobalSettings.notifyChange failed"
$DRY_RUN_CMD ${pkgs.dbus}/bin/dbus-send /KGlobalSettings org.kde.KGlobalSettings.notifyChange int32:$changeType int32:0 || echo "KGlobalSettings.notifyChange $changeType failed"
done
'';
};
Expand Down

0 comments on commit b354e90

Please sign in to comment.