nixos/xserver: Document xrandrHeads.apply
It was asked by @CMCDragonkai to elaborate on that, so let's just do this by actually providing a code comment. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
d7a8876c13
commit
79e712822f
@ -374,6 +374,8 @@ in
|
|||||||
type = with types; listOf (coercedTo str (output: {
|
type = with types; listOf (coercedTo str (output: {
|
||||||
inherit output;
|
inherit output;
|
||||||
}) (submodule { options = xrandrOptions; }));
|
}) (submodule { options = xrandrOptions; }));
|
||||||
|
# Set primary to true for the first head if no other has been set
|
||||||
|
# primary already.
|
||||||
apply = heads: let
|
apply = heads: let
|
||||||
hasPrimary = any (x: x.primary) heads;
|
hasPrimary = any (x: x.primary) heads;
|
||||||
firstPrimary = head heads // { primary = true; };
|
firstPrimary = head heads // { primary = true; };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user