From e2e290166eb941c71378b43fe3c071eff59c80f3 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 4 Nov 2024 11:00:11 +0000 Subject: [PATCH] Adjust kanata timings using config from dreams-of-code, renable service --- system/desktop.nix | 2 +- system/kanata.kbd | 52 ++++++++++++++++++---------------------------- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/system/desktop.nix b/system/desktop.nix index b21d2178..480cf2ca 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -57,7 +57,7 @@ package = pkgs.gnome3.gvfs; }; kanata = { - enable = false; + enable = true; keyboards.main = { config = builtins.readFile ./kanata.kbd; extraDefCfg = "process-unmapped-keys yes"; diff --git a/system/kanata.kbd b/system/kanata.kbd index 3837462f..1c60b004 100644 --- a/system/kanata.kbd +++ b/system/kanata.kbd @@ -1,34 +1,22 @@ -( - defsrc - a s d f - j k l ; - ) +(defsrc + a s d f j k l ; +) +(defvar + tap-time 150 + hold-time 200 +) -( - defvar - tap-time 200 - hold-time 200 - ) +(defalias + a (tap-hold $tap-time $hold-time a lmet) + s (tap-hold $tap-time $hold-time s lalt) + d (tap-hold $tap-time $hold-time d lsft) + f (tap-hold $tap-time $hold-time f lctl) + j (tap-hold $tap-time $hold-time j lctl) + k (tap-hold $tap-time $hold-time k lsft) + l (tap-hold $tap-time $hold-time l lalt) + ; (tap-hold $tap-time $hold-time ; lmet) +) -( - defalias - a-mod (tap-hold-press $tap-time $hold-time a lmet) - s-mod (tap-hold-press $tap-time $hold-time s lalt) - d-mod (tap-hold-press $tap-time $hold-time d lsft) - f-mod (tap-hold-press $tap-time $hold-time f lctl) - j-mod (tap-hold-press $tap-time $hold-time j lctl) - k-mod (tap-hold-press $tap-time $hold-time k lsft) - l-mod (tap-hold-press $tap-time $hold-time l lalt) - ;-mod (tap-hold $tap-time $hold-time ; lmet) - ) - -( - deflayer base - @a-mod @s-mod @d-mod @f-mod - @j-mod @k-mod @l-mod @;-mod - ) - -;; Local Variables: -;; mode: lisp -;; apheleia-mode: nil -;; End: +(deflayer base + @a @s @d @f @j @k @l @; +)