aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2024-05-21 17:01:56 -0700
committerCaroline Larimore <caroline@larimo.re>2024-05-21 17:01:56 -0700
commit8fc8554d8a60f5acda74462c3ff19450a5443547 (patch)
treebb644b3b554037babf7fd16464cd6cbfb3900412 /system
parentf71b3fe651e8a549f4d26b6aa84eaf8ca1a7e3e7 (diff)
Swap alt and meta keys using keyd
Diffstat (limited to 'system')
-rw-r--r--system/default.nix1
-rw-r--r--system/keyd.nix23
2 files changed, 24 insertions, 0 deletions
diff --git a/system/default.nix b/system/default.nix
index 8a8b05b..ca5412c 100644
--- a/system/default.nix
+++ b/system/default.nix
@@ -3,6 +3,7 @@
{
imports = [
./fonts.nix
+ ./keyd.nix
./networking.nix
./pipewire.nix
./xserver.nix
diff --git a/system/keyd.nix b/system/keyd.nix
new file mode 100644
index 0000000..6732912
--- /dev/null
+++ b/system/keyd.nix
@@ -0,0 +1,23 @@
+{ ... }:
+
+{
+ services.keyd = {
+ enable = true;
+
+ keyboards."*".settings = {
+ main = {
+ # Swap alt and meta keys.
+ # I prefer (physical) alt as my WM modifier key because it
+ # is easier to reach. This can collide with some programs
+ # shortcuts if they inlcude alt. Swapping alt and meta fixes
+ # this by making my WM mod key (software) meta, freeing up alt.
+
+ leftalt = "leftmeta";
+ leftmeta = "leftalt";
+
+ rightalt = "rightmeta";
+ rightmeta = "rightalt";
+ };
+ };
+ };
+}