Skip to content

Commit

Permalink
feat(input): add displayName option for keyboard layouts (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
tucho authored Sep 27, 2024
1 parent a02fef2 commit 29ad64f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions modules/input.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ let
'';
apply = builtins.toString;
};
displayName = mkOption {
type = with types; nullOr str;
default = null;
example = "us";
description = ''
Keyboard layout display name.
'';
apply = builtins.toString;
};
};
};

Expand Down Expand Up @@ -414,6 +423,11 @@ in
layout = "ca";
variant = "eng";
}
{
layout = "us";
variant = "intl";
displayName = "usi";
}
];
description = ''
Keyboard layouts to use.
Expand Down Expand Up @@ -464,6 +478,7 @@ in
Use.value = true;
LayoutList.value = strings.concatStringsSep "," (map (l: l.layout) cfg.input.keyboard.layouts);
VariantList.value = strings.concatStringsSep "," (map (l: l.variant) cfg.input.keyboard.layouts);
DisplayNames.value = strings.concatStringsSep "," (map (l: l.displayName) cfg.input.keyboard.layouts);
};
})
(mkIf (cfg.input.keyboard.options != null) {
Expand Down

0 comments on commit 29ad64f

Please sign in to comment.