mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
qt: pass negative KDE settings as values
Insert the command-option terminator before values passed to kwriteconfig6 so negative numeric settings are not parsed as command flags. This fixes KDE settings such as DimDisplayIdleTimeoutSec = -1, which previously produced an unknown-option error from kwriteconfig6. Cover the regression in the existing qt-basic NMT test by checking the generated activation command includes the terminator before the negative value.
This commit is contained in:
committed by
Robert Helgesson
parent
f63af17f47
commit
1772e8fb83
@@ -65,9 +65,9 @@ in
|
||||
if v == null then
|
||||
"--delete"
|
||||
else if t == "bool" then
|
||||
"--type bool ${builtins.toJSON v}"
|
||||
"--type bool -- ${builtins.toJSON v}"
|
||||
else
|
||||
lib.escapeShellArg (toString v);
|
||||
"-- ${lib.escapeShellArg (toString v)}";
|
||||
toLine =
|
||||
file: path: value:
|
||||
if builtins.isAttrs value then
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
{
|
||||
qt.enable = true;
|
||||
|
||||
qt.kde.settings.powerdevilrc.AC.Display.DimDisplayIdleTimeoutSec = -1;
|
||||
|
||||
nmt.script = ''
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'QT_PLUGIN_PATH'
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'QML2_IMPORT_PATH'
|
||||
assertFileRegex activate \
|
||||
"kwriteconfig6 .*--file '/home/hm-user/.config/powerdevilrc' .*--key DimDisplayIdleTimeoutSec -- -1"
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user