diff options
-rw-r--r-- | desktop.nix | 2 | ||||
-rw-r--r-- | intcp-mapper.nix | 6 | ||||
-rw-r--r-- | pc_x230.nix | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/desktop.nix b/desktop.nix index e6a53f0..765304d 100644 --- a/desktop.nix +++ b/desktop.nix @@ -69,7 +69,7 @@ let mappings = [ { from = "KEY_CAPSLOCK"; to = "KEY_LEFTCTRL"; } { from = "KEY_LEFTALT"; to = "KEY_LEFTMETA"; } - { from = "KEY_102ND"; to = "KEY_LEFTALT"; } + { from = "KEY_LEFTCTRL"; to = "KEY_LEFTALT"; } ]; mapper = pkgs.callPackage ./intcp-mapper.nix { inherit mappings; }; intercept = pkgs.interception-tools; diff --git a/intcp-mapper.nix b/intcp-mapper.nix index 5863f85..95f0a6a 100644 --- a/intcp-mapper.nix +++ b/intcp-mapper.nix @@ -20,11 +20,13 @@ int main(void) { */ if (event.type == EV_KEY) { + switch (event.code) { ${ lib.concatStrings (map (m: '' - if (event.code == ${m.from}) { + case ${m.from}: event.code = ${m.to}; - } + break; '') mappings) } + } } fwrite(&event, sizeof(event), 1, stdout); diff --git a/pc_x230.nix b/pc_x230.nix index 247f2b1..fbda73e 100644 --- a/pc_x230.nix +++ b/pc_x230.nix @@ -4,7 +4,7 @@ networking = { hostName = "nixX230"; - interfaces.enp2s25.useDHCP = true; + interfaces.enp0s25.useDHCP = true; interfaces.wlp3s0.useDHCP = true; }; @@ -38,10 +38,6 @@ services = { tlp = { enable = true; - settings = { - START_CHARGE_THRESH_BAT0 = 90; - STOP_CHARGE_THRESH_BAT0 = 95; - }; }; fwupd.enable = true; }; |