1
0
mirror of https://github.com/kmein/niveum synced 2026-03-28 23:31:07 +01:00

niri: simplify keyboard setup

This commit is contained in:
2026-03-22 08:29:45 +01:00
parent fde5e535d6
commit ef9dc9f526
2 changed files with 13 additions and 17 deletions

View File

@@ -5,7 +5,7 @@
...
}:
let
niri-config-with = settings: (pkgs.niphas-niri.passthru.configuration.apply settings).wrapper;
niri-config-with = settings: pkgs.niphas-niri.passthru.configuration.apply settings;
commaSep = builtins.concatStringsSep ",";
xkbOptions = [
@@ -119,12 +119,14 @@ in
elif [ -n "$NIRI_SOCKET" ]; then
${lib.getExe pkgs.niphas-niri} msg action load-config-file --path ${
(niri-config-with {
settings.input.keyboard.xkb = {
layout = "${defaultLanguage.code},${code}";
variant = "${defaultLanguage.variant},${variant}";
options = commaSep xkbOptions;
settings.input = lib.recursiveUpdate pkgs.niphas-niri.configuration.settings.input {
keyboard.xkb = {
layout = "${defaultLanguage.code},${code}";
variant = "${defaultLanguage.variant},${variant}";
options = commaSep xkbOptions;
};
};
}).passthru.configuration."config.kdl".path
})."config.kdl".path
}
elif [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
hyprctl keyword input:kb_variant "" # otherwise we end up with an invalid combination for a short while