autorandr: configModule.extraConfig
Add an option to programs.autorandr's configModule to allow arbitrary extra config lines. No option exists for adding arbitrary key/values to generated autorandr profile config, as is common in other nix modules. This commit adds one.
This commit is contained in:
parent
ef50612457
commit
433e686675
2 changed files with 22 additions and 2 deletions
|
|
@ -177,6 +177,18 @@ let
|
|||
default = null;
|
||||
example = "nearest";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
description = "Extra lines to append to this profile's config.";
|
||||
default = "";
|
||||
example = literalExpression ''
|
||||
'''
|
||||
x-prop-non_desktop 0
|
||||
some-key some-value
|
||||
'''
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -267,7 +279,8 @@ let
|
|||
+ concatMapStringsSep "," toString (flatten config.transform))
|
||||
++ optional (config.scale != null)
|
||||
((if config.scale.method == "factor" then "scale" else "scale-from")
|
||||
+ " ${toString config.scale.x}x${toString config.scale.y}"))
|
||||
+ " ${toString config.scale.x}x${toString config.scale.y}")
|
||||
++ optional (config.extraConfig != "") config.extraConfig)
|
||||
else ''
|
||||
output ${name}
|
||||
off
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue