summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2022-03-14 18:50:46 +0100
committerJulian T <julian@jtle.dk>2022-03-14 18:50:46 +0100
commit535cda761c846195e0e0f36bed6ad5e77587e794 (patch)
tree8b33c3430f79dcec19a0d9aea4e980e9710be8b6
parent122fb9a33ec133070a4d0c9da34607b480e2a29e (diff)
More keymapping and x230 things
-rw-r--r--desktop.nix2
-rw-r--r--intcp-mapper.nix6
-rw-r--r--pc_x230.nix6
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;
};