niri: finally, real keyboards
This commit is contained in:
38
packages/keyboardScripts.nix
Normal file
38
packages/keyboardScripts.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ pkgs, lib }:
|
||||
let
|
||||
keyboards = {
|
||||
german = {
|
||||
code = "de";
|
||||
variant = "T3";
|
||||
};
|
||||
russian = {
|
||||
code = "ru";
|
||||
variant = "phonetic_winkeys";
|
||||
};
|
||||
greek = {
|
||||
code = "gr";
|
||||
variant = "polytonic";
|
||||
};
|
||||
};
|
||||
|
||||
keyboardScripts = lib.mapAttrs' (
|
||||
name: keyboard:
|
||||
lib.nameValuePair "kb-${name}" (
|
||||
pkgs.writers.writeDashBin "kb-${name}" ''
|
||||
exec ${lib.getExe pkgs.niphas-niri} msg action load-config-file --path ${
|
||||
pkgs.niphas-niri-config-with {
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb.layout = "de,${keyboard.code}";
|
||||
xkb.variant = "T3,${keyboard.variant}";
|
||||
xkb.options = "compose:caps,grp:ctrls_toggle";
|
||||
numlock = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
''
|
||||
)
|
||||
) keyboards;
|
||||
in
|
||||
keyboardScripts
|
||||
Reference in New Issue
Block a user