mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-02-13 19:00:19 +01:00
sway: Support multiple keyboards
This commit is contained in:
parent
bf58ac712c
commit
730b5df5ee
2 changed files with 19 additions and 19 deletions
|
|
@ -15,9 +15,9 @@ with builtins; {
|
|||
|
||||
extraInfo.inputs = {
|
||||
keyboard = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = types.listOf types.str;
|
||||
description = "Sway keyboard identifier";
|
||||
default = null;
|
||||
default = [];
|
||||
};
|
||||
touchpad = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
|
|
|
|||
34
wm/sway.nix
34
wm/sway.nix
|
|
@ -130,28 +130,28 @@ in {
|
|||
];
|
||||
input = let
|
||||
inputs = config.extraInfo.inputs;
|
||||
inputsCfg = [
|
||||
(
|
||||
if inputs.keyboard != null
|
||||
then {
|
||||
name = inputs.keyboard;
|
||||
inputsCfg =
|
||||
[
|
||||
(
|
||||
if inputs.touchpad != null
|
||||
then {
|
||||
name = inputs.touchpad;
|
||||
value = {dwt = "disable";};
|
||||
}
|
||||
else null
|
||||
)
|
||||
]
|
||||
++ (
|
||||
builtins.map (k: {
|
||||
name = k;
|
||||
value = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "dvp";
|
||||
xkb_options = "compose:102";
|
||||
};
|
||||
}
|
||||
else null
|
||||
)
|
||||
(
|
||||
if inputs.touchpad != null
|
||||
then {
|
||||
name = inputs.touchpad;
|
||||
value = {dwt = "disable";};
|
||||
}
|
||||
else null
|
||||
)
|
||||
];
|
||||
})
|
||||
inputs.keyboard
|
||||
);
|
||||
in
|
||||
builtins.listToAttrs inputsCfg;
|
||||
fonts = common.mkFont cfg.font;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue