aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/i3.nix5
-rw-r--r--system/default.nix1
-rw-r--r--system/keyd.nix23
3 files changed, 27 insertions, 2 deletions
diff --git a/home/i3.nix b/home/i3.nix
index 86d2e05..2df6dc9 100644
--- a/home/i3.nix
+++ b/home/i3.nix
@@ -5,7 +5,8 @@
enable = true;
config = let
- mod = "Mod1";
+ #NOTE: Alt (Mod1) and meta (Mod4) have been swapped by keyd.
+ mod = "Mod4";
ws0 = "0:Main";
ws1 = "1:Terminal";
@@ -117,7 +118,7 @@
"Shift+Print" = "exec ${pkgs.flameshot}/bin/flameshot screen -c";
"Print" = "exec ${pkgs.flameshot}/bin/flameshot full -c";
"${mod}+Shift+s" = "exec ${pkgs.flameshot}/bin/flameshot gui -c";
- "Mod4+Shift+s" = "exec ${pkgs.flameshot}/bin/flameshot gui -c";
+ "Mod1+Shift+s" = "exec ${pkgs.flameshot}/bin/flameshot gui -c";
"${mod}+Ctrl+Shift+s" = "exec ${pkgs.flameshot}/bin/flameshot launcher -c";
# Media keys
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";
+ };
+ };
+ };
+}