flake and kbd

This commit is contained in:
Matt Nish-Lapidus 2025-05-16 13:35:05 -04:00
parent 7309e102bf
commit 05901af723
3 changed files with 37 additions and 18 deletions

24
flake.lock generated
View file

@ -376,11 +376,11 @@
]
},
"locked": {
"lastModified": 1747340209,
"narHash": "sha256-tUiXrwlJoG3dzJ+fSwv1S3VPU5ODSPZJHoBmlu4t344=",
"lastModified": 1747374689,
"narHash": "sha256-JT/aBZqmK1LbExzwT9cPkvxKc0IC4i6tZKOPjsSWFbI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "098e365dd83311cc8236f83ea6be42abb49a6c76",
"rev": "d2263ce5f4c251c0f7608330e8fdb7d1f01f0667",
"type": "github"
},
"original": {
@ -1292,11 +1292,11 @@
]
},
"locked": {
"lastModified": 1745116541,
"narHash": "sha256-5xzA6dTfqCfTTDCo3ipPZzrg3wp01xmcr73y4cTNMP8=",
"lastModified": 1747363019,
"narHash": "sha256-N4dwkRBmpOosa4gfFkFf/LTD8oOcNkAyvZ07JvRDEf0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "e2142ef330a61c02f274ac9a9cb6f8487a5d0080",
"rev": "0e624f2b1972a34be1a9b35290ed18ea4b419b6f",
"type": "github"
},
"original": {
@ -1637,11 +1637,11 @@
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1747290850,
"narHash": "sha256-jx8S0LnBkEonEh3XivYIwpxt+IT/+6/EhPZdAtJgtwI=",
"lastModified": 1747385703,
"narHash": "sha256-dbpR9AKGBtlAKRPujwH0RrJnGxkDrd9ok7rwHnaWdcI=",
"owner": "sxyazi",
"repo": "yazi",
"rev": "464acfe47b3cbea2713b91d553ff648b8f07ff89",
"rev": "746c7f5ce9840d583f52cdf24b9250668a12a445",
"type": "github"
},
"original": {
@ -1658,11 +1658,11 @@
]
},
"locked": {
"lastModified": 1747278581,
"narHash": "sha256-2TzDRpuU3Ae5yEvt8HiNbgK/c6JogUqQGvTQq7Hj+iA=",
"lastModified": 1747408728,
"narHash": "sha256-B38sO5NNWMohtmrQMnAXQIWETcMuaMe/KUJCwhxQCcQ=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "8358d144bccc142fffff1743d1b2dd15e24f7f3a",
"rev": "53b304dc5f0ab19810bc1cf4bbbb80546afd696a",
"type": "github"
},
"original": {

View file

@ -31,6 +31,7 @@
(aspellWithDicts (dicts: with dicts; [ en en-computers en-science es fr ]))
texlive.combined.scheme-full
openrgb-with-all-plugins
bazecor
])
];

View file

@ -1,5 +1,13 @@
{ inputs, pkgs, ... }:
let
k-vars = ''
(defvar
tap-timeout 100
hold-timeout 200)
'';
in
{
environment.systemPackages = [
pkgs.kanata
@ -16,11 +24,17 @@
services.kanata = {
enable = true;
keyboards = {
sinc = {
devices = [ "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-kbd"
"/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-if02"
"/dev/input/by-id/usb-Keebio_Sinc_Rev._4-if02-event-joystick" ];
extraDefCfg = ''
process-unmapped-keys yes
concurrent-tap-hold yes
'';
config = ''
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc
@ -30,10 +44,12 @@
lsft z x c v b n m , . / rsft up pgdn
lctl slck lmet lalt spc ralt rmet rctrl left down right)
${k-vars}
(defalias
supesc (tap-hold-press 100 200 esc lmet)
sp-lsft (tap-hold-press 100 200 S-9 lsft)
sp-rsft (tap-hold-press 100 200 S-0 lsft)
supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet)
sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft)
sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft)
controls (layer-while-held controls))
(deflayer qwerty
@ -65,10 +81,12 @@
lsft z x c v b n m , . / rsft
lctrl lmet lalt spc ralt rctrl)
${k-vars}
(defalias
supesc (tap-hold-press 100 200 esc lmet)
sp-lsft (tap-hold-press 100 200 S-9 lsft)
sp-rsft (tap-hold-press 100 200 S-0 lsft))
supesc (tap-hold-press $tap-timeout $hold-timeout esc lmet)
sp-lsft (tap-hold-press $tap-timeout $hold-timeout S-9 lsft)
sp-rsft (tap-hold-press $tap-timeout $hold-timeout S-0 lsft))
(deflayer qwerty
grv 1 2 3 4 5 6 7 8 9 0 - = bspc