Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions modules/services/kanshi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,28 @@ let
Sets the output transform.
'';
};

adaptiveSync = mkOption {
type = types.nullOr types.bool;
default = null;
example = true;
description = ''
Enables or disables adaptive synchronization
(aka. Variable Refresh Rate).
'';
};
};
};

outputStr = { criteria, status, mode, position, scale, transform, ... }:
outputStr =
{ criteria, status, mode, position, scale, transform, adaptiveSync, ... }:
''output "${criteria}"'' + optionalString (status != null) " ${status}"
+ optionalString (mode != null) " mode ${mode}"
+ optionalString (position != null) " position ${position}"
+ optionalString (scale != null) " scale ${toString scale}"
+ optionalString (transform != null) " transform ${transform}";
+ optionalString (transform != null) " transform ${transform}"
+ optionalString (adaptiveSync != null)
" adaptive_sync ${if adaptiveSync then "on" else "off"}";

profileModule = types.submodule {
options = {
Expand Down