feat: use kanata on laptop

This commit is contained in:
Moritz Böhme 2024-08-20 14:00:20 +02:00
parent 781d06f3de
commit 6cbe647af7
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -27,6 +27,87 @@
users.users.moritz.packages = [ pkgs.poetry ];
services.kanata = {
enable = true;
keyboards = {
laptop = {
devices = [
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
];
config = "
(defsrc
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
caps a s d f g h j k l ; ' ret
lsft z x c v b n m , . / rsft
lctl lmet lalt spc ralt rctl
)
(deflayermap (default)
;; tarmak 1a
j n
n k
k e
;; tarmak 1b
h m
m h
;; tarmak 2a
b z
z x
x c
;; tarmak 2b
e f
f t
t b
;; tarmak 3
c d
d s
s r
;; tarmak 4
r p
p ;
; o
o y
y j
;; tarmak 5
u l
l i
i u
;; caps-word tap-dance
lsft (tap-dance 200 (_ (caps-word 2000) _ _))
;; change ctrl alt and meta
lctl lalt
lmet lctl
lalt (tap-dance 200 (lmet (multi lmet alt) lmet lmet))
;; hjkl layer
ralt (layer-while-held hjkl)
;; do not do fancy stuff
rctl (layer-switch normal)
)
(deflayermap (normal)
rctl (layer-switch default))
(deflayermap (hjkl)
h left
j down
k up
l right)
";
};
};
};
# BOOT
boot = {
supportedFilesystems = [ "zfs" ];