From c47aa273212812f160bfab9240ca9daa3abd9996 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 5 Nov 2024 10:34:24 +0000 Subject: [PATCH] Disable remapping caps to ctrl at xserver level Use kanata to allow caps on tap and ctrl on hold. --- system/desktop.nix | 6 +----- system/home/desktop/hyprland.nix | 4 ++-- system/home/desktop/sway.nix | 4 ++-- system/kanata.kbd | 5 +++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/system/desktop.nix b/system/desktop.nix index 480cf2ca..c2b70cde 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -87,11 +87,7 @@ }; xserver = { enable = true; - xkb = { - layout = "gb"; - variant = ""; - options = "ctrl:nocaps"; - }; + xkb.layout = "gb"; }; }; xdg.portal = { diff --git a/system/home/desktop/hyprland.nix b/system/home/desktop/hyprland.nix index 10c7b475..77b9f907 100644 --- a/system/home/desktop/hyprland.nix +++ b/system/home/desktop/hyprland.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + osConfig, ... }: { @@ -175,8 +176,7 @@ ]; gestures.workspace_swipe = true; input = { - kb_layout = "gb"; - kb_options = "ctrl:nocaps"; + kb_layout = osConfig.services.xserver.xkb.layout; follow_mouse = 1; touchpad.natural_scroll = "yes"; }; diff --git a/system/home/desktop/sway.nix b/system/home/desktop/sway.nix index 7be6ea57..86fa9bc4 100644 --- a/system/home/desktop/sway.nix +++ b/system/home/desktop/sway.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + osConfig, ... }: { @@ -75,8 +76,7 @@ config = { input = { "*" = { - xkb_layout = "gb"; - xkb_options = "ctrl:nocaps"; + xkb_layout = osConfig.services.xserver.xkb.layout; }; "type:touchpad" = { tap = "enabled"; diff --git a/system/kanata.kbd b/system/kanata.kbd index 75900717..e35321e7 100644 --- a/system/kanata.kbd +++ b/system/kanata.kbd @@ -1,5 +1,5 @@ (defsrc - a s d f j k l ; + caps a s d f j k l ; ) (defvar tap-time 150 @@ -7,6 +7,7 @@ ) (defalias + capsctrl (tap-hold 100 100 caps lctl) a (tap-hold $tap-time $hold-time a lsft) s (tap-hold $tap-time $hold-time s lalt) d (tap-hold $tap-time $hold-time d lmet) @@ -18,7 +19,7 @@ ) (deflayer base - @a @s @d @f @j @k @l @; + @capsctrl @a @s @d @f @j @k @l @; ) ;; Local Variables: