palette/nixos/kanata.nix
George Kaklamanos 73a1d1f61f
kanata: Manage numrow, disable numbers
Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
2024-05-03 23:15:32 +03:00

88 lines
3.5 KiB
Nix

{
config,
lib,
pkgs,
...
}: {
services.kanata.enable = true;
services.kanata.keyboards.mykbd.config = ''
(defsrc
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ' [ ]
caps a r s t g m n e i o
lsft z x c d v k h , . /
lctl lmet lalt spc ret ;
)
(deflayer default
;;grv 1 2 3 4 5 6 7 8 9 0 - = bspc
_ XX XX XX XX XX XX XX XX XX XX _ _ _
;;tab q w f d b j l u y ' [ ]
_ _ _ _ _ _ _ _ _ _ _ _ _
;;caps a r s t g m n e i o
_ _ _ @chs @cht _ _ _ _ _ _
;;lsft z x c d v k h , . /
_ _ _ _ _ _ _ _ _ _ _
;;lctl lmet lalt spc ret ;
_ _ _ @chspc @chret _
)
(deflayer arrows
;;grv 1 2 3 4 5 6 7 8 9 0 - = bspc
XX XX XX XX XX XX XX XX XX XX XX _ _ XX
;;tab q w f p b j l u y ' [ ]
XX XX XX XX XX XX XX XX XX XX XX XX XX
;;caps a r s t g m n e i o
XX XX XX XX XX XX left down up rght XX
;;lsft z x c d v k h , . /
XX XX XX XX XX XX XX XX XX XX XX
;;lctl lmet lalt spc ret ;
XX XX XX XX XX XX
)
(deflayer num
;;grv 1 2 3 4 5 6 7 8 9 0 - = bspc
XX XX XX XX XX XX XX XX XX XX XX XX XX XX
;;tab q w f p b j l u y ' [ ]
XX XX XX XX XX XX XX 7 8 9 XX XX XX
;;caps a r s t g m n e i o
XX XX XX XX XX XX XX 4 5 6 XX
;;lsft z x c d v k h , . /
XX XX XX XX XX XX XX 1 2 3 XX
;;lctl lmet lalt spc ret ;
XX XX XX XX XX 0
)
(deflayer misc
;;grv 1 2 3 4 5 6 7 8 9 0 - = bspc
XX XX XX XX XX XX XX XX XX XX XX XX XX XX
;;tab q w f p b j l u y ' [ ]
XX S-1 S-2 S-3 S-4 S-5 S-6 S-7 S-8 S-9 XX XX XX
;;caps a r s t g m n e i o
XX XX XX XX XX XX XX [ S-[ XX XX
;;lsft z x c d v k h , . /
XX XX XX XX XX XX XX ] S-] XX XX
;;lctl lmet lalt spc ret ;
XX XX XX XX XX XX
)
(defalias
num (layer-while-held num)
arrows (layer-while-held arrows)
misc (layer-while-held misc)
cht (chord example t)
chs (chord example s)
chspc (chord example spc)
chret (chord example ret)
)
(defchords example 500
(t) t
(s) s
(spc) spc
(ret) ret
(spc s) @num
(spc t) @arrows
(spc ret) @misc
)
'';
}