palette/nixos/kanata.nix
George Kaklamanos 396f4a4b86
kanata: Rename layer misc->symbols
Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
2024-05-21 14:11:53 +03:00

99 lines
3.7 KiB
Nix

{
config,
lib,
pkgs,
...
}: {
services.kanata.enable = true;
services.kanata.keyboards.mykbd.extraDefCfg = ''
linux-dev-names-include (
"AT Translated Set 2 keyboard"
)
'';
services.kanata.keyboards.mykbd.config = ''
(defvirtualkeys
tld S-grv
)
(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 , . /
_ _ _ _ @chd _ _ _ _ _ _
;;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 0 XX
)
(deflayer symbols
;;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-6 S-5 grv S-7 S-3 S-8 S-4 XX XX XX
;;caps a r s t g m n e i o
XX XX XX XX XX @tld XX [ S-[ S-9 XX
;;lsft z x c d v k h , . /
XX XX XX XX XX XX XX ] S-] S-0 XX
;;lctl lmet lalt spc ; ret
XX XX XX XX XX XX
)
(defalias
num (layer-while-held num)
arrows (layer-while-held arrows)
symbols (layer-while-held symbols)
cht (chord example t)
chs (chord example s)
chd (chord example d)
chspc (chord example spc)
chret (chord example ret)
tld (on-press tap-virtualkey tld)
)
(defchords example 500
(t) t
(s) s
(d) d
(spc) spc
(ret) ret
(spc s) @num
(spc t) @arrows
(spc d) @symbols
)
'';
}