v1
This commit is contained in:
parent
62df62c3aa
commit
db11846811
27 changed files with 887 additions and 64 deletions
29
modules/hardware/kmonad.nix
Normal file
29
modules/hardware/kmonad.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.xyno.hardware.kmonad;
|
||||
in
|
||||
{
|
||||
options.xyno.hardware.kmonad.enable = lib.mkEnableOption "kmonad with xynos brain damage";
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.kmonad = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
builtin = {
|
||||
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
|
||||
config = builtins.readFile ./kmonad/builtin.kbd;
|
||||
};
|
||||
k70-office = {
|
||||
device = "/dev/input/by-id/usb-Corsair_CORSAIR_K70_CORE_RGB_TKL_Mechanical_Gaming_Keyboard_599A4D472DCAC05584072AFB922E3BFB-event-kbd";
|
||||
config = builtins.readFile ./kmonad/k70.kbd;
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
89
modules/hardware/kmonad/builtin.kbd
Normal file
89
modules/hardware/kmonad/builtin.kbd
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
(defcfg
|
||||
;; ** For Linux **
|
||||
input (device-file "/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd")
|
||||
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
|
||||
output (uinput-sink "KMonad output")
|
||||
|
||||
;; ** For Windows **
|
||||
;; input (low-level-hook)
|
||||
;; output (send-event-sink)
|
||||
|
||||
;; ** For MacOS **
|
||||
;; input (iokit-name "my-keyboard-product-string")
|
||||
;; output (kext)
|
||||
|
||||
fallthrough true
|
||||
)
|
||||
|
||||
(defsrc
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
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 102d z x c v b n m , . / rsft
|
||||
lctl lmet lalt spc ralt rmet cmp rctl
|
||||
)
|
||||
|
||||
(defalias
|
||||
ext (layer-toggle extend) ;; Bind 'ext' to the Extend Layer
|
||||
)
|
||||
|
||||
(defalias
|
||||
cpy C-c
|
||||
pst C-v
|
||||
cut C-x
|
||||
udo C-z
|
||||
all C-a
|
||||
fnd C-f
|
||||
bk Back
|
||||
fw Forward
|
||||
)
|
||||
(defalias
|
||||
num (layer-toggle num)
|
||||
)
|
||||
|
||||
(deflayer colemak-dh
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w f p b j l u y ; [ ]
|
||||
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) t g m n (tap-hold-next-release 200 e rmet) (tap-hold-next-release 200 i lalt) (tap-hold-next-release 200 o rctrl) ' \\ ret
|
||||
lsft z x c d v 102d k h , . / rsft
|
||||
lctl lmet lalt spc ralt rmet _ _
|
||||
)
|
||||
(deflayer num
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w f p b j l u y ; [ ]
|
||||
esc 1 2 3 4 5 6 7 8 9 0 ' \\ ret
|
||||
lsft z x c d v 102d k h , . / rsft
|
||||
lctl lmet lalt spc ralt rmet _ _
|
||||
)
|
||||
|
||||
(deflayer colemak-dhk
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w f p b j l u y ; [ ]
|
||||
@ext a r s t g k n e i o ' \\ ret
|
||||
lsft z x c d v 102d m h , . / rsft
|
||||
lctl lmet lalt spc ralt rmet _ _
|
||||
)
|
||||
|
||||
(deflayer extend
|
||||
_ play rewind previoussong nextsong ejectcd refresh brdn brup www mail prog1 prog2
|
||||
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
|
||||
_ esc @bk @fnd @fw ins pgup home up end menu prnt slck
|
||||
_ lalt lmet lsft lctl ralt pgdn lft down rght del caps _ _
|
||||
_ @udo @cut @cpy tab @pst _ pgdn bks lsft lctl comp _
|
||||
_ _ _ ret _ _ _ _
|
||||
)
|
||||
|
||||
|
||||
(deflayer empty
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _
|
||||
)
|
||||
|
||||
89
modules/hardware/kmonad/k70.kbd
Normal file
89
modules/hardware/kmonad/k70.kbd
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
(defcfg
|
||||
;; ** For Linux **
|
||||
input (device-file "/dev/input/by-id/usb-Corsair_CORSAIR_K70_CORE_RGB_TKL_Mechanical_Gaming_Keyboard_599A4D472DCAC05584072AFB922E3BFB-event-kbd")
|
||||
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
|
||||
output (uinput-sink "KMonad output razer")
|
||||
|
||||
;; ** For Windows **
|
||||
;; input (low-level-hook)
|
||||
;; output (send-event-sink)
|
||||
|
||||
;; ** For MacOS **
|
||||
;; input (iokit-name "my-keyboard-product-string")
|
||||
;; output (kext)
|
||||
|
||||
fallthrough true
|
||||
)
|
||||
|
||||
(defsrc
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
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 102d z x c v b n m , . / rsft
|
||||
lctl lmet lalt spc ralt rmet cmp rctl
|
||||
)
|
||||
|
||||
(defalias
|
||||
ext (layer-toggle extend) ;; Bind 'ext' to the Extend Layer
|
||||
)
|
||||
|
||||
(defalias
|
||||
cpy C-c
|
||||
pst C-v
|
||||
cut C-x
|
||||
udo C-z
|
||||
all C-a
|
||||
fnd C-f
|
||||
bk Back
|
||||
fw Forward
|
||||
)
|
||||
(defalias
|
||||
num (layer-toggle num)
|
||||
)
|
||||
|
||||
(deflayer colemak-dh
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
z 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab (tap-hold-next-release 200 q @num) w f p b j l u y (tap-hold-next-release 200 ; @num) [ ]
|
||||
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) t g m n (tap-hold-next-release 200 e rmet) (tap-hold-next-release 200 i lalt) (tap-hold-next-release 200 o rctrl) ' \\ ret
|
||||
lsft z x c d v 102d k h , . / rsft
|
||||
lctl lmet lalt spc ralt rmet _ _
|
||||
)
|
||||
(deflayer num
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w f p b j l u y ; [ ]
|
||||
esc 1 2 3 4 5 6 7 8 9 0 ' \\ ret
|
||||
lsft z x c d v 102d k h , . / rsft
|
||||
lctl lmet lalt spc ralt rmet _ _
|
||||
)
|
||||
|
||||
(deflayer colemak-dhk
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w f p b j l u y ; [ ]
|
||||
@ext a r s t g k n e i o ' \\ ret
|
||||
lsft z x c d v 102d m h , . / rsft
|
||||
lctl lmet lalt spc ralt rmet _ _
|
||||
)
|
||||
|
||||
(deflayer extend
|
||||
_ play rewind previoussong nextsong ejectcd refresh brdn brup www mail prog1 prog2
|
||||
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
|
||||
_ esc @bk @fnd @fw ins pgup home up end menu prnt slck
|
||||
_ lalt lmet lsft lctl ralt pgdn lft down rght del caps _ _
|
||||
_ @udo @cut @cpy tab @pst _ pgdn bks lsft lctl comp _
|
||||
_ _ _ ret _ _ _ _
|
||||
)
|
||||
|
||||
|
||||
(deflayer empty
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
_ _ _ _ _ _ _ _
|
||||
)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue